[2e][db] Add coins for 2e

breaking API change
This commit is contained in:
2024-05-22 22:06:55 +02:00
parent ebe5c33332
commit 779a5c349b
8 changed files with 803 additions and 5 deletions
+5 -3
View File
@@ -6,13 +6,15 @@
"version": "8.0.0", "version": "8.0.0",
"commands": [ "commands": [
"dotnet-aspnet-codegenerator" "dotnet-aspnet-codegenerator"
] ],
"rollForward": false
}, },
"dotnet-ef": { "dotnet-ef": {
"version": "8.0.0", "version": "8.0.5",
"commands": [ "commands": [
"dotnet-ef" "dotnet-ef"
] ],
"rollForward": false
} }
} }
} }
@@ -0,0 +1,711 @@
// <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("20240522200515_FelszerelesCoinsFor2E")]
partial class FelszerelesCoinsFor2E
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "8.0.5")
.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<int>("AranyTaller")
.HasColumnType("integer");
b.Property<byte>("Bolcsesseg")
.HasColumnType("smallint");
b.Property<byte>("Egeszseg")
.HasColumnType("smallint");
b.Property<int>("ElektrumTaller")
.HasColumnType("integer");
b.Property<byte>("Ero")
.HasColumnType("smallint");
b.Property<int>("EzustTaller")
.HasColumnType("integer");
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
}
}
}
@@ -0,0 +1,51 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Kemkas.Web.Db.Migrations
{
/// <inheritdoc />
public partial class FelszerelesCoinsFor2E : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<int>(
name: "AranyTaller",
table: "Karakterek2E",
type: "integer",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<int>(
name: "ElektrumTaller",
table: "Karakterek2E",
type: "integer",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<int>(
name: "EzustTaller",
table: "Karakterek2E",
type: "integer",
nullable: false,
defaultValue: 0);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "AranyTaller",
table: "Karakterek2E");
migrationBuilder.DropColumn(
name: "ElektrumTaller",
table: "Karakterek2E");
migrationBuilder.DropColumn(
name: "EzustTaller",
table: "Karakterek2E");
}
}
}
@@ -17,7 +17,7 @@ namespace Kemkas.Web.Db.Migrations
{ {
#pragma warning disable 612, 618 #pragma warning disable 612, 618
modelBuilder modelBuilder
.HasAnnotation("ProductVersion", "8.0.0") .HasAnnotation("ProductVersion", "8.0.5")
.HasAnnotation("Relational:MaxIdentifierLength", 63); .HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
@@ -300,15 +300,24 @@ namespace Kemkas.Web.Db.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("uuid"); .HasColumnType("uuid");
b.Property<int>("AranyTaller")
.HasColumnType("integer");
b.Property<byte>("Bolcsesseg") b.Property<byte>("Bolcsesseg")
.HasColumnType("smallint"); .HasColumnType("smallint");
b.Property<byte>("Egeszseg") b.Property<byte>("Egeszseg")
.HasColumnType("smallint"); .HasColumnType("smallint");
b.Property<int>("ElektrumTaller")
.HasColumnType("integer");
b.Property<byte>("Ero") b.Property<byte>("Ero")
.HasColumnType("smallint"); .HasColumnType("smallint");
b.Property<int>("EzustTaller")
.HasColumnType("integer");
b.Property<int>("Faj") b.Property<int>("Faj")
.HasColumnType("integer"); .HasColumnType("integer");
+6
View File
@@ -30,6 +30,12 @@ public class V2Karakter
public string? Pancel { get; set; } public string? Pancel { get; set; }
public string? Pajzs { get; set; } public string? Pajzs { get; set; }
public int AranyTaller { get; set; }
public int ElektrumTaller { get; set; }
public int EzustTaller { get; set; }
[ForeignKey(nameof(OwnerUserId))] [ForeignKey(nameof(OwnerUserId))]
public ApplicationUser? OwnerUser { get; set; } public ApplicationUser? OwnerUser { get; set; }
@@ -31,7 +31,10 @@ public class Character2EDtoToDbModelService : ICharacter2EDtoToDbModelService
Karizma = dto.Tulajdonsagok.Kar, Karizma = dto.Tulajdonsagok.Kar,
Szint = dto.Szint, Szint = dto.Szint,
Pajzs = dto.Felszereles.PajzsId, Pajzs = dto.Felszereles.PajzsId,
Pancel = dto.Felszereles.PancelId Pancel = dto.Felszereles.PancelId,
AranyTaller = dto.Felszereles.AranyTaller,
ElektrumTaller = dto.Felszereles.ElektrumTaller,
EzustTaller = dto.Felszereles.EzustTaller,
}; };
karakter.KarakterKepzettsegek = ConvertKarakterKepzettsegek(dto, karakter); karakter.KarakterKepzettsegek = ConvertKarakterKepzettsegek(dto, karakter);
@@ -96,6 +99,10 @@ public class Character2EDtoToDbModelService : ICharacter2EDtoToDbModelService
original.Szint = dto.Szint; original.Szint = dto.Szint;
original.Pajzs = dto.Felszereles.PajzsId; original.Pajzs = dto.Felszereles.PajzsId;
original.Pancel = dto.Felszereles.PancelId; original.Pancel = dto.Felszereles.PancelId;
original.AranyTaller = dto.Felszereles.AranyTaller;
original.ElektrumTaller = dto.Felszereles.ElektrumTaller;
original.EzustTaller = dto.Felszereles.EzustTaller;
original.KarakterKepzettsegek = ConvertKarakterKepzettsegek(dto, original); original.KarakterKepzettsegek = ConvertKarakterKepzettsegek(dto, original);
var felszereles = dto.Felszereles.Fegyverek.Select(x => new V2Felszereles var felszereles = dto.Felszereles.Fegyverek.Select(x => new V2Felszereles
{ {
@@ -41,6 +41,9 @@ public class CharacterDbModelToDto2EService : ICharacterDbModelToDto2EService
Viselt = entity.Felszereles.Where(x => x.IsViselt).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(), 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(), Aprosagok = entity.Felszereles.Where(x => x.IsAprosag).Select(x => new FelszerelesIdAndCount { Id = x.TargyId, Count = x.Count}).ToList(),
AranyTaller = entity.AranyTaller,
ElektrumTaller = entity.ElektrumTaller,
EzustTaller = entity.EzustTaller,
}, },
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
@@ -21,4 +21,13 @@ public class KarakterFelszereles2eDto
[JsonPropertyName("aprosagok")] [JsonPropertyName("aprosagok")]
public IList<FelszerelesIdAndCount> Aprosagok { get; set; } public IList<FelszerelesIdAndCount> Aprosagok { get; set; }
[JsonPropertyName("at")]
public int AranyTaller { get; set; }
[JsonPropertyName("el")]
public int ElektrumTaller { get; set; }
[JsonPropertyName("et")]
public int EzustTaller { get; set; }
} }