mirror of
https://github.com/morbalint/kemkas-backend.git
synced 2026-07-17 21:23:46 +00:00
[2e][DB] felszereles viselt cipelt aprosagok
This commit is contained in:
@@ -43,7 +43,7 @@ jobs:
|
|||||||
docker push registry.digitalocean.com/kemkas/kemkas-be:${{ env.GITHUB_SHA_SHORT }}
|
docker push registry.digitalocean.com/kemkas/kemkas-be:${{ env.GITHUB_SHA_SHORT }}
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: morbalint/kemkas-deployment
|
repository: ${{ github.repository_owner }}/kemkas-deployment
|
||||||
ref: refs/heads/main
|
ref: refs/heads/main
|
||||||
path: ./deployment-repo
|
path: ./deployment-repo
|
||||||
clean: false
|
clean: false
|
||||||
|
|||||||
Generated
+702
@@ -0,0 +1,702 @@
|
|||||||
|
// <auto-generated />
|
||||||
|
using System;
|
||||||
|
using Kemkas.Web.Db;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Kemkas.Web.Db.Migrations
|
||||||
|
{
|
||||||
|
[DbContext(typeof(ApplicationDbContext))]
|
||||||
|
[Migration("20240521001219_FelszerelesUpgradeViseltCipeltAprosagokIn2E")]
|
||||||
|
partial class FelszerelesUpgradeViseltCipeltAprosagokIn2E
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
|
{
|
||||||
|
#pragma warning disable 612, 618
|
||||||
|
modelBuilder
|
||||||
|
.HasAnnotation("ProductVersion", "8.0.0")
|
||||||
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||||
|
|
||||||
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||||
|
|
||||||
|
modelBuilder.Entity("Kemkas.Web.Db.Models.ApplicationRole", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("ConcurrencyStamp")
|
||||||
|
.IsConcurrencyToken()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("Name")
|
||||||
|
.HasMaxLength(256)
|
||||||
|
.HasColumnType("character varying(256)");
|
||||||
|
|
||||||
|
b.Property<string>("NormalizedName")
|
||||||
|
.HasMaxLength(256)
|
||||||
|
.HasColumnType("character varying(256)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("NormalizedName")
|
||||||
|
.IsUnique()
|
||||||
|
.HasDatabaseName("RoleNameIndex");
|
||||||
|
|
||||||
|
b.ToTable("AspNetRoles", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Kemkas.Web.Db.Models.ApplicationUser", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<int>("AccessFailedCount")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<string>("ConcurrencyStamp")
|
||||||
|
.IsConcurrencyToken()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("Email")
|
||||||
|
.HasMaxLength(256)
|
||||||
|
.HasColumnType("character varying(256)");
|
||||||
|
|
||||||
|
b.Property<bool>("EmailConfirmed")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<bool>("LockoutEnabled")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<DateTimeOffset?>("LockoutEnd")
|
||||||
|
.HasColumnType("timestamp with time zone");
|
||||||
|
|
||||||
|
b.Property<string>("NormalizedEmail")
|
||||||
|
.HasMaxLength(256)
|
||||||
|
.HasColumnType("character varying(256)");
|
||||||
|
|
||||||
|
b.Property<string>("NormalizedUserName")
|
||||||
|
.HasMaxLength(256)
|
||||||
|
.HasColumnType("character varying(256)");
|
||||||
|
|
||||||
|
b.Property<string>("PasswordHash")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("PhoneNumber")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<bool>("PhoneNumberConfirmed")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<string>("SecurityStamp")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<bool>("TwoFactorEnabled")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<string>("UserName")
|
||||||
|
.HasMaxLength(256)
|
||||||
|
.HasColumnType("character varying(256)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("NormalizedEmail")
|
||||||
|
.HasDatabaseName("EmailIndex");
|
||||||
|
|
||||||
|
b.HasIndex("NormalizedUserName")
|
||||||
|
.IsUnique()
|
||||||
|
.HasDatabaseName("UserNameIndex");
|
||||||
|
|
||||||
|
b.ToTable("AspNetUsers", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Kemkas.Web.Db.Models.V1Felszereles", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uuid");
|
||||||
|
|
||||||
|
b.Property<bool>("IsFegyver")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<Guid>("KarakterId")
|
||||||
|
.HasColumnType("uuid");
|
||||||
|
|
||||||
|
b.Property<string>("Name")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("KarakterId");
|
||||||
|
|
||||||
|
b.ToTable("Felszerelesek");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Kemkas.Web.Db.Models.V1Karakter", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uuid");
|
||||||
|
|
||||||
|
b.Property<byte>("Bolcsesseg")
|
||||||
|
.HasColumnType("smallint");
|
||||||
|
|
||||||
|
b.Property<byte>("Egeszseg")
|
||||||
|
.HasColumnType("smallint");
|
||||||
|
|
||||||
|
b.Property<byte>("Ero")
|
||||||
|
.HasColumnType("smallint");
|
||||||
|
|
||||||
|
b.Property<int>("Faj")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<byte>("Intelligencia")
|
||||||
|
.HasColumnType("smallint");
|
||||||
|
|
||||||
|
b.Property<bool>("IsPublic")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<string>("Isten")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<byte>("Jellem")
|
||||||
|
.HasColumnType("smallint");
|
||||||
|
|
||||||
|
b.Property<byte>("Karizma")
|
||||||
|
.HasColumnType("smallint");
|
||||||
|
|
||||||
|
b.Property<double?>("Kor")
|
||||||
|
.HasColumnType("double precision");
|
||||||
|
|
||||||
|
b.Property<string>("Nem")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("Nev")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<int>("Osztaly")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<int?>("OwnerUserId")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<string>("Pajzs")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("Pancel")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<byte>("Szint")
|
||||||
|
.HasColumnType("smallint");
|
||||||
|
|
||||||
|
b.Property<byte>("Ugyesseg")
|
||||||
|
.HasColumnType("smallint");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("OwnerUserId");
|
||||||
|
|
||||||
|
b.ToTable("Karakterek");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Kemkas.Web.Db.Models.V1KarakterKepzettseg", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uuid");
|
||||||
|
|
||||||
|
b.Property<bool>("IsTolvajKepzettseg")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<Guid>("KarakterId")
|
||||||
|
.HasColumnType("uuid");
|
||||||
|
|
||||||
|
b.Property<int>("Kepzettseg")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("KarakterId");
|
||||||
|
|
||||||
|
b.ToTable("KarakterKepzettsegek");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Kemkas.Web.Db.Models.V1Szintlepes", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uuid");
|
||||||
|
|
||||||
|
b.Property<string>("FegyverSpecializacio")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<byte>("HpRoll")
|
||||||
|
.HasColumnType("smallint");
|
||||||
|
|
||||||
|
b.Property<Guid>("KarakterId")
|
||||||
|
.HasColumnType("uuid");
|
||||||
|
|
||||||
|
b.Property<byte>("KarakterSzint")
|
||||||
|
.HasColumnType("smallint");
|
||||||
|
|
||||||
|
b.Property<byte?>("TulajdonsagNoveles")
|
||||||
|
.HasColumnType("smallint");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("KarakterId");
|
||||||
|
|
||||||
|
b.ToTable("Szintlepesek");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Kemkas.Web.Db.Models.V2Felszereles", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uuid");
|
||||||
|
|
||||||
|
b.Property<int>("Count")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<bool>("IsAprosag")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<bool>("IsCipelt")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<bool>("IsFegyver")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<bool>("IsViselt")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<Guid>("KarakterId")
|
||||||
|
.HasColumnType("uuid");
|
||||||
|
|
||||||
|
b.Property<string>("TargyId")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("KarakterId");
|
||||||
|
|
||||||
|
b.ToTable("Felszerelesek2E");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Kemkas.Web.Db.Models.V2Karakter", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uuid");
|
||||||
|
|
||||||
|
b.Property<byte>("Bolcsesseg")
|
||||||
|
.HasColumnType("smallint");
|
||||||
|
|
||||||
|
b.Property<byte>("Egeszseg")
|
||||||
|
.HasColumnType("smallint");
|
||||||
|
|
||||||
|
b.Property<byte>("Ero")
|
||||||
|
.HasColumnType("smallint");
|
||||||
|
|
||||||
|
b.Property<int>("Faj")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<byte>("Intelligencia")
|
||||||
|
.HasColumnType("smallint");
|
||||||
|
|
||||||
|
b.Property<bool>("IsPublic")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<string>("Isten")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<byte>("Jellem")
|
||||||
|
.HasColumnType("smallint");
|
||||||
|
|
||||||
|
b.Property<byte>("Karizma")
|
||||||
|
.HasColumnType("smallint");
|
||||||
|
|
||||||
|
b.Property<double?>("Kor")
|
||||||
|
.HasColumnType("double precision");
|
||||||
|
|
||||||
|
b.Property<string>("Nem")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("Nev")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<int?>("OwnerUserId")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<string>("Pajzs")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("Pancel")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<byte>("Szint")
|
||||||
|
.HasColumnType("smallint");
|
||||||
|
|
||||||
|
b.Property<byte>("Ugyesseg")
|
||||||
|
.HasColumnType("smallint");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("OwnerUserId");
|
||||||
|
|
||||||
|
b.ToTable("Karakterek2E");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Kemkas.Web.Db.Models.V2KarakterKepzettseg", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uuid");
|
||||||
|
|
||||||
|
b.Property<bool>("IsTolvajKepzettseg")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<Guid>("KarakterId")
|
||||||
|
.HasColumnType("uuid");
|
||||||
|
|
||||||
|
b.Property<int>("Kepzettseg")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("KarakterId");
|
||||||
|
|
||||||
|
b.ToTable("KarakterKepzettsegek2E");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Kemkas.Web.Db.Models.V2Szintlepes", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uuid");
|
||||||
|
|
||||||
|
b.Property<string>("FegyverSpecializacio")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<byte>("HpRoll")
|
||||||
|
.HasColumnType("smallint");
|
||||||
|
|
||||||
|
b.Property<Guid>("KarakterId")
|
||||||
|
.HasColumnType("uuid");
|
||||||
|
|
||||||
|
b.Property<byte>("KarakterSzint")
|
||||||
|
.HasColumnType("smallint");
|
||||||
|
|
||||||
|
b.Property<int>("Osztaly")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<int?>("TolvajExtraKepzettseg")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<byte?>("TulajdonsagNoveles")
|
||||||
|
.HasColumnType("smallint");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("KarakterId");
|
||||||
|
|
||||||
|
b.ToTable("Szintlepesek2E");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Microsoft.AspNetCore.DataProtection.EntityFrameworkCore.DataProtectionKey", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("FriendlyName")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("Xml")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("DataProtectionKeys");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<int>", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("ClaimType")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("ClaimValue")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<int>("RoleId")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("RoleId");
|
||||||
|
|
||||||
|
b.ToTable("AspNetRoleClaims", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("ClaimType")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("ClaimValue")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<int>("UserId")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("UserId");
|
||||||
|
|
||||||
|
b.ToTable("AspNetUserClaims", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b =>
|
||||||
|
{
|
||||||
|
b.Property<string>("LoginProvider")
|
||||||
|
.HasMaxLength(128)
|
||||||
|
.HasColumnType("character varying(128)");
|
||||||
|
|
||||||
|
b.Property<string>("ProviderKey")
|
||||||
|
.HasMaxLength(128)
|
||||||
|
.HasColumnType("character varying(128)");
|
||||||
|
|
||||||
|
b.Property<string>("ProviderDisplayName")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<int>("UserId")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.HasKey("LoginProvider", "ProviderKey");
|
||||||
|
|
||||||
|
b.HasIndex("UserId");
|
||||||
|
|
||||||
|
b.ToTable("AspNetUserLogins", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<int>", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("UserId")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<int>("RoleId")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.HasKey("UserId", "RoleId");
|
||||||
|
|
||||||
|
b.HasIndex("RoleId");
|
||||||
|
|
||||||
|
b.ToTable("AspNetUserRoles", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("UserId")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<string>("LoginProvider")
|
||||||
|
.HasMaxLength(128)
|
||||||
|
.HasColumnType("character varying(128)");
|
||||||
|
|
||||||
|
b.Property<string>("Name")
|
||||||
|
.HasMaxLength(128)
|
||||||
|
.HasColumnType("character varying(128)");
|
||||||
|
|
||||||
|
b.Property<string>("Value")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.HasKey("UserId", "LoginProvider", "Name");
|
||||||
|
|
||||||
|
b.ToTable("AspNetUserTokens", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Kemkas.Web.Db.Models.V1Felszereles", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("Kemkas.Web.Db.Models.V1Karakter", "Karakter")
|
||||||
|
.WithMany("Felszereles")
|
||||||
|
.HasForeignKey("KarakterId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.Navigation("Karakter");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Kemkas.Web.Db.Models.V1Karakter", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("Kemkas.Web.Db.Models.ApplicationUser", "OwnerUser")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("OwnerUserId");
|
||||||
|
|
||||||
|
b.Navigation("OwnerUser");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Kemkas.Web.Db.Models.V1KarakterKepzettseg", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("Kemkas.Web.Db.Models.V1Karakter", "Karakter")
|
||||||
|
.WithMany("KarakterKepzettsegek")
|
||||||
|
.HasForeignKey("KarakterId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.Navigation("Karakter");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Kemkas.Web.Db.Models.V1Szintlepes", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("Kemkas.Web.Db.Models.V1Karakter", "Karakter")
|
||||||
|
.WithMany("Szintlepesek")
|
||||||
|
.HasForeignKey("KarakterId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.Navigation("Karakter");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Kemkas.Web.Db.Models.V2Felszereles", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("Kemkas.Web.Db.Models.V2Karakter", "Karakter")
|
||||||
|
.WithMany("Felszereles")
|
||||||
|
.HasForeignKey("KarakterId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.Navigation("Karakter");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Kemkas.Web.Db.Models.V2Karakter", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("Kemkas.Web.Db.Models.ApplicationUser", "OwnerUser")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("OwnerUserId");
|
||||||
|
|
||||||
|
b.Navigation("OwnerUser");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Kemkas.Web.Db.Models.V2KarakterKepzettseg", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("Kemkas.Web.Db.Models.V2Karakter", "Karakter")
|
||||||
|
.WithMany("KarakterKepzettsegek")
|
||||||
|
.HasForeignKey("KarakterId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.Navigation("Karakter");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Kemkas.Web.Db.Models.V2Szintlepes", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("Kemkas.Web.Db.Models.V2Karakter", "Karakter")
|
||||||
|
.WithMany("Szintlepesek")
|
||||||
|
.HasForeignKey("KarakterId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.Navigation("Karakter");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<int>", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("Kemkas.Web.Db.Models.ApplicationRole", null)
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("RoleId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("Kemkas.Web.Db.Models.ApplicationUser", null)
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("UserId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("Kemkas.Web.Db.Models.ApplicationUser", null)
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("UserId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<int>", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("Kemkas.Web.Db.Models.ApplicationRole", null)
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("RoleId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.HasOne("Kemkas.Web.Db.Models.ApplicationUser", null)
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("UserId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("Kemkas.Web.Db.Models.ApplicationUser", null)
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("UserId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Kemkas.Web.Db.Models.V1Karakter", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("Felszereles");
|
||||||
|
|
||||||
|
b.Navigation("KarakterKepzettsegek");
|
||||||
|
|
||||||
|
b.Navigation("Szintlepesek");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Kemkas.Web.Db.Models.V2Karakter", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("Felszereles");
|
||||||
|
|
||||||
|
b.Navigation("KarakterKepzettsegek");
|
||||||
|
|
||||||
|
b.Navigation("Szintlepesek");
|
||||||
|
});
|
||||||
|
#pragma warning restore 612, 618
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+62
@@ -0,0 +1,62 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Kemkas.Web.Db.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class FelszerelesUpgradeViseltCipeltAprosagokIn2E : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<int>(
|
||||||
|
name: "Count",
|
||||||
|
table: "Felszerelesek2E",
|
||||||
|
type: "integer",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 1);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<bool>(
|
||||||
|
name: "IsAprosag",
|
||||||
|
table: "Felszerelesek2E",
|
||||||
|
type: "boolean",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: false);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<bool>(
|
||||||
|
name: "IsCipelt",
|
||||||
|
table: "Felszerelesek2E",
|
||||||
|
type: "boolean",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: false);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<bool>(
|
||||||
|
name: "IsViselt",
|
||||||
|
table: "Felszerelesek2E",
|
||||||
|
type: "boolean",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: false);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "Count",
|
||||||
|
table: "Felszerelesek2E");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "IsAprosag",
|
||||||
|
table: "Felszerelesek2E");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "IsCipelt",
|
||||||
|
table: "Felszerelesek2E");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "IsViselt",
|
||||||
|
table: "Felszerelesek2E");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -265,9 +265,21 @@ namespace Kemkas.Web.Db.Migrations
|
|||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("uuid");
|
.HasColumnType("uuid");
|
||||||
|
|
||||||
|
b.Property<int>("Count")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<bool>("IsAprosag")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<bool>("IsCipelt")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<bool>("IsFegyver")
|
b.Property<bool>("IsFegyver")
|
||||||
.HasColumnType("boolean");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<bool>("IsViselt")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<Guid>("KarakterId")
|
b.Property<Guid>("KarakterId")
|
||||||
.HasColumnType("uuid");
|
.HasColumnType("uuid");
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
using System.ComponentModel;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
@@ -10,8 +11,18 @@ public class V2Felszereles
|
|||||||
public Guid KarakterId { get; set; }
|
public Guid KarakterId { get; set; }
|
||||||
|
|
||||||
public string TargyId { get; set; }
|
public string TargyId { get; set; }
|
||||||
public bool IsFegyver { get; set; } = true;
|
|
||||||
|
[DefaultValue(1)]
|
||||||
|
public int Count { get; set; } = 1;
|
||||||
|
|
||||||
|
public bool IsFegyver { get; set; } = false;
|
||||||
|
|
||||||
|
public bool IsViselt { get; set; } = false;
|
||||||
|
|
||||||
|
public bool IsCipelt { get; set; } = false;
|
||||||
|
|
||||||
|
public bool IsAprosag { get; set; } = false;
|
||||||
|
|
||||||
[ForeignKey(nameof(KarakterId))]
|
[ForeignKey(nameof(KarakterId))]
|
||||||
public virtual V2Karakter Karakter { get; set; }
|
public virtual V2Karakter Karakter { get; set; }
|
||||||
}
|
}
|
||||||
+10
-9
@@ -55,20 +55,21 @@ builder.Services.AddHealthChecks();
|
|||||||
builder.Services.AddCharacter1EServices();
|
builder.Services.AddCharacter1EServices();
|
||||||
builder.Services.AddCharacter2EServices();
|
builder.Services.AddCharacter2EServices();
|
||||||
|
|
||||||
|
// Configure the HTTP request pipeline.
|
||||||
var app = builder.Build();
|
var app = builder.Build();
|
||||||
app.UsePathBase("/api");
|
app.UsePathBase("/api");
|
||||||
|
|
||||||
// Configure the HTTP request pipeline.
|
app.UseForwardedHeaders(new ForwardedHeadersOptions
|
||||||
|
{
|
||||||
|
ForwardedForHeaderName = "X-Forwarded-For",
|
||||||
|
ForwardedHostHeaderName = "X-Forwarded-Host",
|
||||||
|
ForwardedProtoHeaderName = "X-Forwarded-Proto",
|
||||||
|
ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedHost | ForwardedHeaders.XForwardedProto,
|
||||||
|
KnownNetworks = { new IPNetwork(new IPAddress([0,0,0,0]), 0) }
|
||||||
|
});
|
||||||
|
|
||||||
if (app.Environment.IsDevelopment())
|
if (app.Environment.IsDevelopment())
|
||||||
{
|
{
|
||||||
app.UseForwardedHeaders(new ForwardedHeadersOptions
|
|
||||||
{
|
|
||||||
ForwardedForHeaderName = "X-Forwarded-For",
|
|
||||||
ForwardedHostHeaderName = "X-Forwarded-Host",
|
|
||||||
ForwardedProtoHeaderName = "X-Forwarded-Proto",
|
|
||||||
ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedHost | ForwardedHeaders.XForwardedProto,
|
|
||||||
KnownNetworks = { new IPNetwork(new IPAddress([0,0,0,0]), 0) }
|
|
||||||
});
|
|
||||||
app.UseMigrationsEndPoint();
|
app.UseMigrationsEndPoint();
|
||||||
app.UseDeveloperExceptionPage();
|
app.UseDeveloperExceptionPage();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,11 +32,11 @@ public class Character1EDtoToDbModelService : ICharacter1EDtoToDbModelService
|
|||||||
Bolcsesseg = dto.Tulajdonsagok.Bol,
|
Bolcsesseg = dto.Tulajdonsagok.Bol,
|
||||||
Karizma = dto.Tulajdonsagok.Kar,
|
Karizma = dto.Tulajdonsagok.Kar,
|
||||||
Szint = dto.Szint,
|
Szint = dto.Szint,
|
||||||
Pajzs = dto.Felszereles.PajzsId,
|
Pajzs = dto.Felszereles1E.PajzsId,
|
||||||
Pancel = dto.Felszereles.PancelId
|
Pancel = dto.Felszereles1E.PancelId
|
||||||
};
|
};
|
||||||
karakter.KarakterKepzettsegek = ConvertKepzettsegek(dto, karakter);
|
karakter.KarakterKepzettsegek = ConvertKepzettsegek(dto, karakter);
|
||||||
karakter.Felszereles = dto.Felszereles.FegyverIds.Select(x => new V1Felszereles
|
karakter.Felszereles = dto.Felszereles1E.FegyverIds.Select(x => new V1Felszereles
|
||||||
{
|
{
|
||||||
Karakter = karakter,
|
Karakter = karakter,
|
||||||
IsFegyver = true,
|
IsFegyver = true,
|
||||||
@@ -63,10 +63,10 @@ public class Character1EDtoToDbModelService : ICharacter1EDtoToDbModelService
|
|||||||
original.Bolcsesseg = dto.Tulajdonsagok.Bol;
|
original.Bolcsesseg = dto.Tulajdonsagok.Bol;
|
||||||
original.Karizma = dto.Tulajdonsagok.Kar;
|
original.Karizma = dto.Tulajdonsagok.Kar;
|
||||||
original.Szint = dto.Szint;
|
original.Szint = dto.Szint;
|
||||||
original.Pajzs = dto.Felszereles.PajzsId;
|
original.Pajzs = dto.Felszereles1E.PajzsId;
|
||||||
original.Pancel = dto.Felszereles.PancelId;
|
original.Pancel = dto.Felszereles1E.PancelId;
|
||||||
original.KarakterKepzettsegek = ConvertKepzettsegek(dto, original);
|
original.KarakterKepzettsegek = ConvertKepzettsegek(dto, original);
|
||||||
original.Felszereles = dto.Felszereles.FegyverIds.Select(x => new V1Felszereles
|
original.Felszereles = dto.Felszereles1E.FegyverIds.Select(x => new V1Felszereles
|
||||||
{
|
{
|
||||||
Karakter = original,
|
Karakter = original,
|
||||||
IsFegyver = true,
|
IsFegyver = true,
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ public class CharacterDbModelToDto1EService : ICharacterDbModelToDto1EService
|
|||||||
TulajdonsagNovelesek = entity.Szintlepesek.OrderBy(x => x.KarakterSzint).Select(x => x.TulajdonsagNoveles).Where(x => x is not null).Cast<Tulajdonsag>().Select(x => x.Convert()).ToList(),
|
TulajdonsagNovelesek = entity.Szintlepesek.OrderBy(x => x.KarakterSzint).Select(x => x.TulajdonsagNoveles).Where(x => x is not null).Cast<Tulajdonsag>().Select(x => x.Convert()).ToList(),
|
||||||
HarcosSpecializaciok = entity.Osztaly == Osztaly1E.Harcos ? entity.Szintlepesek.OrderBy(x => x.KarakterSzint).Select(x => x.FegyverSpecializacio).Where(x => x != null).Cast<string>().ToList() : [],
|
HarcosSpecializaciok = entity.Osztaly == Osztaly1E.Harcos ? entity.Szintlepesek.OrderBy(x => x.KarakterSzint).Select(x => x.FegyverSpecializacio).Where(x => x != null).Cast<string>().ToList() : [],
|
||||||
KalozKritikus = entity.Osztaly == Osztaly1E.Kaloz ? entity.Szintlepesek.OrderBy(x => x.KarakterSzint).Select(x => x.FegyverSpecializacio).Where(x => x != null).Cast<string>().ToList() : [],
|
KalozKritikus = entity.Osztaly == Osztaly1E.Kaloz ? entity.Szintlepesek.OrderBy(x => x.KarakterSzint).Select(x => x.FegyverSpecializacio).Where(x => x != null).Cast<string>().ToList() : [],
|
||||||
Felszereles = new KarakterFelszerelesDto
|
Felszereles1E = new KarakterFelszereles1eDto
|
||||||
{
|
{
|
||||||
PajzsId = entity.Pajzs,
|
PajzsId = entity.Pajzs,
|
||||||
PancelId = entity.Pancel,
|
PancelId = entity.Pancel,
|
||||||
|
|||||||
@@ -35,12 +35,36 @@ public class Character2EDtoToDbModelService : ICharacter2EDtoToDbModelService
|
|||||||
};
|
};
|
||||||
|
|
||||||
karakter.KarakterKepzettsegek = ConvertKarakterKepzettsegek(dto, karakter);
|
karakter.KarakterKepzettsegek = ConvertKarakterKepzettsegek(dto, karakter);
|
||||||
karakter.Felszereles = dto.Felszereles.FegyverIds.Select(x => new V2Felszereles
|
var felszereles = dto.Felszereles.Fegyverek.Select(x => new V2Felszereles
|
||||||
{
|
{
|
||||||
Karakter = karakter,
|
Karakter = karakter,
|
||||||
IsFegyver = true,
|
IsFegyver = true,
|
||||||
TargyId = x,
|
TargyId = x.Id,
|
||||||
|
Count = x.Count,
|
||||||
}).ToList();
|
}).ToList();
|
||||||
|
felszereles.AddRange(dto.Felszereles.Viselt.Select(x => new V2Felszereles
|
||||||
|
{
|
||||||
|
Karakter = karakter,
|
||||||
|
IsViselt = true,
|
||||||
|
TargyId = x.Id,
|
||||||
|
Count = x.Count,
|
||||||
|
}));
|
||||||
|
felszereles.AddRange(dto.Felszereles.Cipelt.Select(x => new V2Felszereles
|
||||||
|
{
|
||||||
|
Karakter = karakter,
|
||||||
|
IsCipelt = true,
|
||||||
|
TargyId = x.Id,
|
||||||
|
Count = x.Count,
|
||||||
|
}));
|
||||||
|
felszereles.AddRange(dto.Felszereles.Aprosagok.Select(x => new V2Felszereles
|
||||||
|
{
|
||||||
|
Karakter = karakter,
|
||||||
|
IsAprosag = true,
|
||||||
|
TargyId = x.Id,
|
||||||
|
Count = x.Count,
|
||||||
|
}));
|
||||||
|
karakter.Felszereles = felszereles;
|
||||||
|
|
||||||
karakter.Szintlepesek = dto.Szintlepesek.Select((x, i) => new V2Szintlepes
|
karakter.Szintlepesek = dto.Szintlepesek.Select((x, i) => new V2Szintlepes
|
||||||
{
|
{
|
||||||
Karakter = karakter,
|
Karakter = karakter,
|
||||||
@@ -73,12 +97,35 @@ public class Character2EDtoToDbModelService : ICharacter2EDtoToDbModelService
|
|||||||
original.Pajzs = dto.Felszereles.PajzsId;
|
original.Pajzs = dto.Felszereles.PajzsId;
|
||||||
original.Pancel = dto.Felszereles.PancelId;
|
original.Pancel = dto.Felszereles.PancelId;
|
||||||
original.KarakterKepzettsegek = ConvertKarakterKepzettsegek(dto, original);
|
original.KarakterKepzettsegek = ConvertKarakterKepzettsegek(dto, original);
|
||||||
original.Felszereles = dto.Felszereles.FegyverIds.Select(x => new V2Felszereles
|
var felszereles = dto.Felszereles.Fegyverek.Select(x => new V2Felszereles
|
||||||
{
|
{
|
||||||
Karakter = original,
|
Karakter = original,
|
||||||
IsFegyver = true,
|
IsFegyver = true,
|
||||||
TargyId = x,
|
TargyId = x.Id,
|
||||||
|
Count = x.Count,
|
||||||
}).ToList();
|
}).ToList();
|
||||||
|
felszereles.AddRange(dto.Felszereles.Viselt.Select(x => new V2Felszereles
|
||||||
|
{
|
||||||
|
Karakter = original,
|
||||||
|
IsViselt = true,
|
||||||
|
TargyId = x.Id,
|
||||||
|
Count = x.Count,
|
||||||
|
}));
|
||||||
|
felszereles.AddRange(dto.Felszereles.Cipelt.Select(x => new V2Felszereles
|
||||||
|
{
|
||||||
|
Karakter = original,
|
||||||
|
IsCipelt = true,
|
||||||
|
TargyId = x.Id,
|
||||||
|
Count = x.Count,
|
||||||
|
}));
|
||||||
|
felszereles.AddRange(dto.Felszereles.Aprosagok.Select(x => new V2Felszereles
|
||||||
|
{
|
||||||
|
Karakter = original,
|
||||||
|
IsAprosag = true,
|
||||||
|
TargyId = x.Id,
|
||||||
|
Count = x.Count,
|
||||||
|
}));
|
||||||
|
original.Felszereles = felszereles;
|
||||||
original.Szintlepesek = dto.Szintlepesek.Select((x, i) => new V2Szintlepes
|
original.Szintlepesek = dto.Szintlepesek.Select((x, i) => new V2Szintlepes
|
||||||
{
|
{
|
||||||
Karakter = original,
|
Karakter = original,
|
||||||
|
|||||||
@@ -33,11 +33,14 @@ public class CharacterDbModelToDto2EService : ICharacterDbModelToDto2EService
|
|||||||
Kepzettsegek = entity.KarakterKepzettsegek.Where(x => !x.IsTolvajKepzettseg).Select(x => x.Kepzettseg.Convert()).ToList(),
|
Kepzettsegek = entity.KarakterKepzettsegek.Where(x => !x.IsTolvajKepzettseg).Select(x => x.Kepzettseg.Convert()).ToList(),
|
||||||
Tolvajkepzettsegek = entity.KarakterKepzettsegek.Where(x => x.IsTolvajKepzettseg).Select(x => x.Kepzettseg.Convert()).ToList(),
|
Tolvajkepzettsegek = entity.KarakterKepzettsegek.Where(x => x.IsTolvajKepzettseg).Select(x => x.Kepzettseg.Convert()).ToList(),
|
||||||
Szint = entity.Szint,
|
Szint = entity.Szint,
|
||||||
Felszereles = new KarakterFelszerelesDto
|
Felszereles = new KarakterFelszereles2eDto
|
||||||
{
|
{
|
||||||
PajzsId = entity.Pajzs,
|
PajzsId = entity.Pajzs,
|
||||||
PancelId = entity.Pancel,
|
PancelId = entity.Pancel,
|
||||||
FegyverIds = entity.Felszereles.Where(x => x.IsFegyver).Select(x => x.TargyId).ToList(),
|
Fegyverek = entity.Felszereles.Where(x => x.IsFegyver).Select(x => new FelszerelesIdAndCount { Id = x.TargyId, Count = x.Count}).ToList(),
|
||||||
|
Viselt = entity.Felszereles.Where(x => x.IsViselt).Select(x => new FelszerelesIdAndCount { Id = x.TargyId, Count = x.Count}).ToList(),
|
||||||
|
Cipelt = entity.Felszereles.Where(x => x.IsCipelt).Select(x => new FelszerelesIdAndCount { Id = x.TargyId, Count = x.Count}).ToList(),
|
||||||
|
Aprosagok = entity.Felszereles.Where(x => x.IsAprosag).Select(x => new FelszerelesIdAndCount { Id = x.TargyId, Count = x.Count}).ToList(),
|
||||||
},
|
},
|
||||||
IsPublic = entity.IsPublic,
|
IsPublic = entity.IsPublic,
|
||||||
Szintlepesek = entity.Szintlepesek.OrderBy(x => x.KarakterSzint).Select(sz => new Szintlepes
|
Szintlepesek = entity.Szintlepesek.OrderBy(x => x.KarakterSzint).Select(sz => new Szintlepes
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ using System.Text.Json.Serialization;
|
|||||||
|
|
||||||
namespace Kemkas.Web.ViewModels;
|
namespace Kemkas.Web.ViewModels;
|
||||||
|
|
||||||
public struct Character1eDto
|
public class Character1eDto
|
||||||
{
|
{
|
||||||
[Required]
|
[Required]
|
||||||
[JsonPropertyName("name")]
|
[JsonPropertyName("name")]
|
||||||
@@ -52,7 +52,7 @@ public struct Character1eDto
|
|||||||
public IList<string> KalozKritikus { get; set; }
|
public IList<string> KalozKritikus { get; set; }
|
||||||
|
|
||||||
[JsonPropertyName("felszereles")]
|
[JsonPropertyName("felszereles")]
|
||||||
public KarakterFelszerelesDto Felszereles { get; set; }
|
public KarakterFelszereles1eDto Felszereles1E { get; set; }
|
||||||
|
|
||||||
public bool? IsPublic { get; set; }
|
public bool? IsPublic { get; set; }
|
||||||
}
|
}
|
||||||
@@ -3,7 +3,7 @@ using System.Text.Json.Serialization;
|
|||||||
|
|
||||||
namespace Kemkas.Web.ViewModels;
|
namespace Kemkas.Web.ViewModels;
|
||||||
|
|
||||||
public struct Character2eDto
|
public class Character2eDto
|
||||||
{
|
{
|
||||||
[Required]
|
[Required]
|
||||||
[JsonPropertyName("nev")]
|
[JsonPropertyName("nev")]
|
||||||
@@ -40,7 +40,7 @@ public struct Character2eDto
|
|||||||
public IList<Szintlepes> Szintlepesek { get; set; }
|
public IList<Szintlepes> Szintlepesek { get; set; }
|
||||||
|
|
||||||
[JsonPropertyName("felszereles")]
|
[JsonPropertyName("felszereles")]
|
||||||
public KarakterFelszerelesDto Felszereles { get; set; }
|
public KarakterFelszereles2eDto Felszereles { get; set; }
|
||||||
|
|
||||||
public bool? IsPublic { get; set; }
|
public bool? IsPublic { get; set; }
|
||||||
}
|
}
|
||||||
@@ -2,7 +2,7 @@ using System.Text.Json.Serialization;
|
|||||||
|
|
||||||
namespace Kemkas.Web.ViewModels;
|
namespace Kemkas.Web.ViewModels;
|
||||||
|
|
||||||
public struct CharacterListItemDto()
|
public class CharacterListItemDto()
|
||||||
{
|
{
|
||||||
[JsonPropertyName("id")]
|
[JsonPropertyName("id")]
|
||||||
public required Guid Id { get; set; }
|
public required Guid Id { get; set; }
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace Kemkas.Web.ViewModels;
|
||||||
|
|
||||||
|
public class FelszerelesIdAndCount
|
||||||
|
{
|
||||||
|
[JsonPropertyName("id")]
|
||||||
|
public string Id { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("count")]
|
||||||
|
public int Count { get; set; }
|
||||||
|
}
|
||||||
+1
-4
@@ -2,10 +2,7 @@ using System.Text.Json.Serialization;
|
|||||||
|
|
||||||
namespace Kemkas.Web.ViewModels;
|
namespace Kemkas.Web.ViewModels;
|
||||||
|
|
||||||
/// <summary>
|
public class KarakterFelszereles1eDto
|
||||||
/// currently the same for 1st edition and 2nd edition, be cautious!
|
|
||||||
/// </summary>
|
|
||||||
public struct KarakterFelszerelesDto
|
|
||||||
{
|
{
|
||||||
[JsonPropertyName("pancelID")]
|
[JsonPropertyName("pancelID")]
|
||||||
public string? PancelId { get; set; }
|
public string? PancelId { get; set; }
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace Kemkas.Web.ViewModels;
|
||||||
|
|
||||||
|
public class KarakterFelszereles2eDto
|
||||||
|
{
|
||||||
|
[JsonPropertyName("pancelID")]
|
||||||
|
public string? PancelId { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("pajzsID")]
|
||||||
|
public string? PajzsId { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("fegyverek")]
|
||||||
|
public IList<FelszerelesIdAndCount> Fegyverek { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("viselt")]
|
||||||
|
public IList<FelszerelesIdAndCount> Viselt { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("cipelt")]
|
||||||
|
public IList<FelszerelesIdAndCount> Cipelt { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("aprosagok")]
|
||||||
|
public IList<FelszerelesIdAndCount> Aprosagok { get; set; }
|
||||||
|
}
|
||||||
@@ -5,7 +5,7 @@ namespace Kemkas.Web.ViewModels;
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// currently the same for 1st edition and 2nd edition, be cautious!
|
/// currently the same for 1st edition and 2nd edition, be cautious!
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public struct KarakterTulajdonsagokDto
|
public class KarakterTulajdonsagokDto
|
||||||
{
|
{
|
||||||
[JsonPropertyName("t_ero")]
|
[JsonPropertyName("t_ero")]
|
||||||
public byte Ero { get; set; }
|
public byte Ero { get; set; }
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ using System.Text.Json.Serialization;
|
|||||||
|
|
||||||
namespace Kemkas.Web.ViewModels;
|
namespace Kemkas.Web.ViewModels;
|
||||||
|
|
||||||
public struct Szintlepes
|
public class Szintlepes
|
||||||
{
|
{
|
||||||
[JsonPropertyName("osztaly")]
|
[JsonPropertyName("osztaly")]
|
||||||
public string Osztaly { get; set; }
|
public string Osztaly { get; set; }
|
||||||
|
|||||||
Reference in New Issue
Block a user