feat: disable identity auto-generation for reference/lookup tables
Reference tables (Province, City, BasicTable, IncomeCostTitle, UnitState, Transaction) require stable, manually assigned IDs that are cross-referenced by other entities. Identity auto-generation is disabled to allow explicit ID assignment from seed data.
This commit is contained in:
993
Complex.Infrastructure/Migrations/20260608225845_InitialCreate.Designer.cs
generated
Normal file
993
Complex.Infrastructure/Migrations/20260608225845_InitialCreate.Designer.cs
generated
Normal file
@@ -0,0 +1,993 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Complex.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Complex.Infrastructure.Migrations
|
||||
{
|
||||
[DbContext(typeof(ComplexDBContext))]
|
||||
[Migration("20260608225845_InitialCreate")]
|
||||
partial class InitialCreate
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "6.0.3")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
|
||||
|
||||
modelBuilder.Entity("Complex.Domain.Entities.BasicTable", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Discriminator")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("BasicTables");
|
||||
|
||||
b.HasDiscriminator<string>("Discriminator").HasValue("BasicTable");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Complex.Domain.Entities.Chat", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1);
|
||||
|
||||
b.Property<string>("Body")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<byte>("ChatTypeId")
|
||||
.HasColumnType("tinyint");
|
||||
|
||||
b.Property<Guid>("ComplexId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("PersonMobileNumber")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Chats");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Complex.Domain.Entities.City", b =>
|
||||
{
|
||||
b.Property<int>("CityId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("CityTitle")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int?>("ProvinceId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("CityId");
|
||||
|
||||
b.HasIndex("ProvinceId");
|
||||
|
||||
b.ToTable("Cities");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Complex.Domain.Entities.ComplexEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Address")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int?>("AreaMeter")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("CityId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int?>("ElevatorCount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("InsertTime")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("datetime2")
|
||||
.HasDefaultValue(new DateTime(2026, 6, 9, 2, 28, 45, 623, DateTimeKind.Local).AddTicks(7632));
|
||||
|
||||
b.Property<bool>("IsRemoved")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false);
|
||||
|
||||
b.Property<Guid?>("ParentId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime?>("RemoveTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int?>("StateId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime?>("UpdateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int?>("WarehouseCount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int?>("YardMeter")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int?>("YearMake")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CityId");
|
||||
|
||||
b.HasIndex("ParentId");
|
||||
|
||||
b.ToTable("ComplexEntities");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Complex.Domain.Entities.ComplexManager", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
|
||||
|
||||
b.Property<Guid>("ComplexId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("EndDate")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("InsertTime")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("datetime2")
|
||||
.HasDefaultValue(new DateTime(2026, 6, 9, 2, 28, 45, 624, DateTimeKind.Local).AddTicks(2426));
|
||||
|
||||
b.Property<bool>("IsRemoved")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false);
|
||||
|
||||
b.Property<string>("ManagerMobileNumberId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<DateTime?>("RemoveTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("StartDate")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime?>("UpdateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ComplexId");
|
||||
|
||||
b.HasIndex("ManagerMobileNumberId");
|
||||
|
||||
b.ToTable("ComplexManagers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Complex.Domain.Entities.ComplexPerson", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
|
||||
|
||||
b.Property<Guid>("ComplexId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("PersonMobileNumberId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("PersonMobileNumberId");
|
||||
|
||||
b.ToTable("ComplexPersons");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Complex.Domain.Entities.ComplexUnitEvent", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1);
|
||||
|
||||
b.Property<string>("Body")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int?>("ComplexId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("EventDate")
|
||||
.IsRequired()
|
||||
.HasMaxLength(10)
|
||||
.HasColumnType("nvarchar(10)");
|
||||
|
||||
b.Property<DateTime>("InsertTime")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("datetime2")
|
||||
.HasDefaultValue(new DateTime(2026, 6, 9, 2, 28, 45, 624, DateTimeKind.Local).AddTicks(5016));
|
||||
|
||||
b.Property<bool>("IsRemoved")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false);
|
||||
|
||||
b.Property<string>("RegisterMobileNumber")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime?>("RemoveTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid?>("UnitId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime?>("UpdateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("ComplexUnitEvents");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Complex.Domain.Entities.CostCycle", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<long>("Amount")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<Guid>("ComplexId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<long>("EncouragementAmount")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<int>("EncouragementDay")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("EndDate")
|
||||
.HasColumnType("date");
|
||||
|
||||
b.Property<int?>("IncomeCostTitleId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("InsertTime")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("datetime2")
|
||||
.HasDefaultValue(new DateTime(2026, 6, 9, 2, 28, 45, 624, DateTimeKind.Local).AddTicks(7249));
|
||||
|
||||
b.Property<bool>("IsRemoved")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false);
|
||||
|
||||
b.Property<DateTime?>("RemoveTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("StartDate")
|
||||
.HasColumnType("date");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime?>("UpdateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ComplexId");
|
||||
|
||||
b.HasIndex("IncomeCostTitleId");
|
||||
|
||||
b.ToTable("CostCycles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Complex.Domain.Entities.IncomeCostTitle", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<Guid?>("ComplexId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("InsertTime")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("datetime2")
|
||||
.HasDefaultValue(new DateTime(2026, 6, 9, 2, 28, 45, 624, DateTimeKind.Local).AddTicks(9858));
|
||||
|
||||
b.Property<bool>("IsRemoved")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false);
|
||||
|
||||
b.Property<string>("RegisterMobileNumber")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime?>("RemoveTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("TransactionTypeId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime?>("UpdateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ComplexId");
|
||||
|
||||
b.HasIndex("TransactionTypeId");
|
||||
|
||||
b.ToTable("IncomeCostTitles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Complex.Domain.Entities.Person", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<byte[]>("Avatar")
|
||||
.HasColumnType("varbinary(max)");
|
||||
|
||||
b.Property<string>("FirstName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<byte?>("Gender")
|
||||
.HasColumnType("tinyint");
|
||||
|
||||
b.Property<DateTime>("InsertTime")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("datetime2")
|
||||
.HasDefaultValue(new DateTime(2026, 6, 9, 2, 28, 45, 625, DateTimeKind.Local).AddTicks(1728));
|
||||
|
||||
b.Property<bool>("IsActive")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("IsRemoved")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false);
|
||||
|
||||
b.Property<string>("LastName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime?>("RemoveTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime?>("UpdateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Persons");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Complex.Domain.Entities.Poster", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
|
||||
|
||||
b.Property<string>("ImagePath")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("IsActive")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("RegisterMobileNumber")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Posters");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Complex.Domain.Entities.Province", b =>
|
||||
{
|
||||
b.Property<int>("ProvinceId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ProvinceTitle")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("ProvinceId");
|
||||
|
||||
b.ToTable("Provinces");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Complex.Domain.Entities.SmsCode", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
|
||||
|
||||
b.Property<string>("Code")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("InsertDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("PhoneNumber")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("RequestCount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("Used")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("SmsCodes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Complex.Domain.Entities.Transaction", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<long>("Amount")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<Guid>("ComplexId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("CostCycleId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("FicheId")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("InsertTime")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("datetime2")
|
||||
.HasDefaultValue(new DateTime(2026, 6, 9, 2, 28, 45, 625, DateTimeKind.Local).AddTicks(3921));
|
||||
|
||||
b.Property<bool>("IsRemoved")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false);
|
||||
|
||||
b.Property<string>("PersonId")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<DateTime?>("RemoveTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("TransactionDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("TransactionPersianDate")
|
||||
.IsRequired()
|
||||
.HasMaxLength(10)
|
||||
.HasColumnType("nvarchar(10)");
|
||||
|
||||
b.Property<int?>("TransactionTitleId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<long>("UnitCostId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<Guid?>("UnitId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime?>("UpdateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CostCycleId");
|
||||
|
||||
b.HasIndex("PersonId");
|
||||
|
||||
b.HasIndex("TransactionTitleId");
|
||||
|
||||
b.HasIndex("UnitCostId")
|
||||
.IsUnique();
|
||||
|
||||
b.HasIndex("UnitId");
|
||||
|
||||
b.ToTable("Transactions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Complex.Domain.Entities.Unit", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<int?>("AreaMeter")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<Guid>("ComplexId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("EmergencyTels")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int?>("Floor")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("InsertTime")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("datetime2")
|
||||
.HasDefaultValue(new DateTime(2026, 6, 9, 2, 28, 45, 625, DateTimeKind.Local).AddTicks(7151));
|
||||
|
||||
b.Property<bool>("IsActive")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("IsRemoved")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false);
|
||||
|
||||
b.Property<string>("ManagerDescription")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("OwnerId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<int?>("ParkingAreaMeter")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("PublicState")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime?>("RemoveTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int?>("StateId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("TenantId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("UnitName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime?>("UpdateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int?>("YardMeter")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ComplexId");
|
||||
|
||||
b.HasIndex("OwnerId");
|
||||
|
||||
b.HasIndex("StateId");
|
||||
|
||||
b.HasIndex("TenantId");
|
||||
|
||||
b.ToTable("Units");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Complex.Domain.Entities.UnitCost", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1);
|
||||
|
||||
b.Property<Guid>("CostCycleId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("Date")
|
||||
.HasColumnType("date");
|
||||
|
||||
b.Property<DateTime>("InsertTime")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("datetime2")
|
||||
.HasDefaultValue(new DateTime(2026, 6, 9, 2, 28, 45, 625, DateTimeKind.Local).AddTicks(9764));
|
||||
|
||||
b.Property<bool>("IsRemoved")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false);
|
||||
|
||||
b.Property<DateTime?>("RemoveTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int?>("TransactionId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<Guid>("UnitId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime?>("UpdateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CostCycleId");
|
||||
|
||||
b.HasIndex("UnitId");
|
||||
|
||||
b.ToTable("UnitCosts");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Complex.Domain.Entities.UnitState", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<Guid?>("ComplexId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Icon")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("InsertTime")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("datetime2")
|
||||
.HasDefaultValue(new DateTime(2026, 6, 9, 2, 28, 45, 626, DateTimeKind.Local).AddTicks(1646));
|
||||
|
||||
b.Property<bool>("IsRemoved")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false);
|
||||
|
||||
b.Property<DateTime?>("RemoveTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime?>("UpdateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("UnitStates");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Complex.Domain.Entities.UserToken", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
|
||||
|
||||
b.Property<string>("MobileModel")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("PersonId")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("RefreshToken")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("RefreshTokenExp")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("TokenExp")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("TokenHash")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("PersonId");
|
||||
|
||||
b.ToTable("UserTokens");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("CostCycleUnit", b =>
|
||||
{
|
||||
b.Property<Guid>("CostCyclesId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid>("UnitsId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.HasKey("CostCyclesId", "UnitsId");
|
||||
|
||||
b.HasIndex("UnitsId");
|
||||
|
||||
b.ToTable("CostCycleUnit");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Complex.Domain.Entities.TransactionType", b =>
|
||||
{
|
||||
b.HasBaseType("Complex.Domain.Entities.BasicTable");
|
||||
|
||||
b.HasDiscriminator().HasValue("TransactionType");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Complex.Domain.Entities.City", b =>
|
||||
{
|
||||
b.HasOne("Complex.Domain.Entities.Province", "Province")
|
||||
.WithMany("Cities")
|
||||
.HasForeignKey("ProvinceId");
|
||||
|
||||
b.Navigation("Province");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Complex.Domain.Entities.ComplexEntity", b =>
|
||||
{
|
||||
b.HasOne("Complex.Domain.Entities.City", "City")
|
||||
.WithMany()
|
||||
.HasForeignKey("CityId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Complex.Domain.Entities.ComplexEntity", "Parent")
|
||||
.WithMany()
|
||||
.HasForeignKey("ParentId");
|
||||
|
||||
b.Navigation("City");
|
||||
|
||||
b.Navigation("Parent");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Complex.Domain.Entities.ComplexManager", b =>
|
||||
{
|
||||
b.HasOne("Complex.Domain.Entities.ComplexEntity", "Complex")
|
||||
.WithMany("ComplexManagers")
|
||||
.HasForeignKey("ComplexId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Complex.Domain.Entities.Person", "ManagerMobileNumber")
|
||||
.WithMany()
|
||||
.HasForeignKey("ManagerMobileNumberId");
|
||||
|
||||
b.Navigation("Complex");
|
||||
|
||||
b.Navigation("ManagerMobileNumber");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Complex.Domain.Entities.ComplexPerson", b =>
|
||||
{
|
||||
b.HasOne("Complex.Domain.Entities.Person", "PersonMobileNumber")
|
||||
.WithMany()
|
||||
.HasForeignKey("PersonMobileNumberId");
|
||||
|
||||
b.Navigation("PersonMobileNumber");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Complex.Domain.Entities.CostCycle", b =>
|
||||
{
|
||||
b.HasOne("Complex.Domain.Entities.ComplexEntity", "Complex")
|
||||
.WithMany()
|
||||
.HasForeignKey("ComplexId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Complex.Domain.Entities.IncomeCostTitle", "IncomeCostTitle")
|
||||
.WithMany()
|
||||
.HasForeignKey("IncomeCostTitleId");
|
||||
|
||||
b.Navigation("Complex");
|
||||
|
||||
b.Navigation("IncomeCostTitle");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Complex.Domain.Entities.IncomeCostTitle", b =>
|
||||
{
|
||||
b.HasOne("Complex.Domain.Entities.ComplexEntity", "Complex")
|
||||
.WithMany()
|
||||
.HasForeignKey("ComplexId");
|
||||
|
||||
b.HasOne("Complex.Domain.Entities.TransactionType", "TransactionType")
|
||||
.WithMany()
|
||||
.HasForeignKey("TransactionTypeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Complex");
|
||||
|
||||
b.Navigation("TransactionType");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Complex.Domain.Entities.Transaction", b =>
|
||||
{
|
||||
b.HasOne("Complex.Domain.Entities.CostCycle", "CostCycle")
|
||||
.WithMany()
|
||||
.HasForeignKey("CostCycleId");
|
||||
|
||||
b.HasOne("Complex.Domain.Entities.Person", "Person")
|
||||
.WithMany()
|
||||
.HasForeignKey("PersonId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Complex.Domain.Entities.IncomeCostTitle", "TransactionTitle")
|
||||
.WithMany()
|
||||
.HasForeignKey("TransactionTitleId");
|
||||
|
||||
b.HasOne("Complex.Domain.Entities.UnitCost", "UnitCost")
|
||||
.WithOne("Transaction")
|
||||
.HasForeignKey("Complex.Domain.Entities.Transaction", "UnitCostId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Complex.Domain.Entities.Unit", "Unit")
|
||||
.WithMany()
|
||||
.HasForeignKey("UnitId");
|
||||
|
||||
b.Navigation("CostCycle");
|
||||
|
||||
b.Navigation("Person");
|
||||
|
||||
b.Navigation("TransactionTitle");
|
||||
|
||||
b.Navigation("Unit");
|
||||
|
||||
b.Navigation("UnitCost");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Complex.Domain.Entities.Unit", b =>
|
||||
{
|
||||
b.HasOne("Complex.Domain.Entities.ComplexEntity", "Complex")
|
||||
.WithMany("Units")
|
||||
.HasForeignKey("ComplexId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Complex.Domain.Entities.Person", "Owner")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerId");
|
||||
|
||||
b.HasOne("Complex.Domain.Entities.UnitState", "State")
|
||||
.WithMany()
|
||||
.HasForeignKey("StateId");
|
||||
|
||||
b.HasOne("Complex.Domain.Entities.Person", "Tenant")
|
||||
.WithMany()
|
||||
.HasForeignKey("TenantId");
|
||||
|
||||
b.Navigation("Complex");
|
||||
|
||||
b.Navigation("Owner");
|
||||
|
||||
b.Navigation("State");
|
||||
|
||||
b.Navigation("Tenant");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Complex.Domain.Entities.UnitCost", b =>
|
||||
{
|
||||
b.HasOne("Complex.Domain.Entities.CostCycle", "CostCycle")
|
||||
.WithMany()
|
||||
.HasForeignKey("CostCycleId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Complex.Domain.Entities.Unit", "Unit")
|
||||
.WithMany()
|
||||
.HasForeignKey("UnitId")
|
||||
.OnDelete(DeleteBehavior.NoAction)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("CostCycle");
|
||||
|
||||
b.Navigation("Unit");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Complex.Domain.Entities.UserToken", b =>
|
||||
{
|
||||
b.HasOne("Complex.Domain.Entities.Person", "Person")
|
||||
.WithMany("UserTokens")
|
||||
.HasForeignKey("PersonId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Person");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("CostCycleUnit", b =>
|
||||
{
|
||||
b.HasOne("Complex.Domain.Entities.CostCycle", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("CostCyclesId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Complex.Domain.Entities.Unit", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("UnitsId")
|
||||
.OnDelete(DeleteBehavior.NoAction)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Complex.Domain.Entities.ComplexEntity", b =>
|
||||
{
|
||||
b.Navigation("ComplexManagers");
|
||||
|
||||
b.Navigation("Units");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Complex.Domain.Entities.Person", b =>
|
||||
{
|
||||
b.Navigation("UserTokens");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Complex.Domain.Entities.Province", b =>
|
||||
{
|
||||
b.Navigation("Cities");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Complex.Domain.Entities.UnitCost", b =>
|
||||
{
|
||||
b.Navigation("Transaction")
|
||||
.IsRequired();
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user