//
using System;
using DataLayer;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace DataLayer.Migrations
{
[DbContext(typeof(DeathwatchDbContext))]
[Migration("20230106171505_InitialCreate")]
partial class InitialCreate
{
///
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "7.0.1")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("Domain.Player", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("AG")
.HasColumnType("int");
b.Property("Background")
.HasColumnType("nvarchar(max)");
b.Property("CC")
.HasColumnType("int");
b.Property("CT")
.HasColumnType("int");
b.Property("CharacterName")
.HasColumnType("nvarchar(max)");
b.Property("CreatedDate")
.HasColumnType("datetime2");
b.Property("E")
.HasColumnType("int");
b.Property("Experience")
.HasColumnType("int");
b.Property("F")
.HasColumnType("int");
b.Property("FM")
.HasColumnType("int");
b.Property("INT")
.HasColumnType("int");
b.Property("MF")
.HasColumnType("int");
b.Property("ModifiedDate")
.HasColumnType("datetime2");
b.Property("Name")
.HasColumnType("nvarchar(max)");
b.Property("PER")
.HasColumnType("int");
b.Property("SOC")
.HasColumnType("int");
b.HasKey("Id");
b.ToTable("Players");
});
modelBuilder.Entity("Domain.Weapons.Weapon", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("At")
.HasColumnType("nvarchar(max)");
b.Property("Attribute")
.HasColumnType("nvarchar(max)");
b.Property("CreatedDate")
.HasColumnType("datetime2");
b.Property("GPE")
.HasColumnType("nvarchar(max)");
b.Property("Mode")
.HasColumnType("nvarchar(max)");
b.Property("ModifiedDate")
.HasColumnType("datetime2");
b.Property("Name")
.HasColumnType("nvarchar(max)");
b.Property("Pene")
.HasColumnType("int");
b.Property("Range")
.HasColumnType("int");
b.Property("Rch")
.HasColumnType("nvarchar(max)");
b.Property("Type")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("Weapons");
});
modelBuilder.Entity("PlayerWeapon", b =>
{
b.Property("PlayersId")
.HasColumnType("int");
b.Property("WeaponsId")
.HasColumnType("int");
b.HasKey("PlayersId", "WeaponsId");
b.HasIndex("WeaponsId");
b.ToTable("PlayerWeapon");
});
modelBuilder.Entity("PlayerWeapon", b =>
{
b.HasOne("Domain.Player", null)
.WithMany()
.HasForeignKey("PlayersId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("Domain.Weapons.Weapon", null)
.WithMany()
.HasForeignKey("WeaponsId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
#pragma warning restore 612, 618
}
}
}