// using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; using TakeoutSaaS.Infrastructure.Dictionary.Persistence; #nullable disable namespace TakeoutSaaS.Infrastructure.Dictionary.Migrations { [DbContext(typeof(DictionaryDbContext))] [Migration("20251201042346_InitialDictionary")] partial class InitialDictionary { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "10.0.0") .HasAnnotation("Relational:MaxIdentifierLength", 63); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); modelBuilder.Entity("TakeoutSaaS.Domain.Dictionary.Entities.DictionaryGroup", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Code") .IsRequired() .HasMaxLength(64) .HasColumnType("character varying(64)"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone"); b.Property("CreatedBy") .HasColumnType("uuid"); b.Property("DeletedAt") .HasColumnType("timestamp with time zone"); b.Property("DeletedBy") .HasColumnType("uuid"); b.Property("Description") .HasMaxLength(512) .HasColumnType("character varying(512)"); b.Property("IsEnabled") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(true); b.Property("Name") .IsRequired() .HasMaxLength(128) .HasColumnType("character varying(128)"); b.Property("Scope") .HasColumnType("integer"); b.Property("TenantId") .HasColumnType("uuid"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone"); b.Property("UpdatedBy") .HasColumnType("uuid"); b.HasKey("Id"); b.HasIndex("TenantId"); b.HasIndex("TenantId", "Code") .IsUnique(); b.ToTable("dictionary_groups", (string)null); }); modelBuilder.Entity("TakeoutSaaS.Domain.Dictionary.Entities.DictionaryItem", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone"); b.Property("CreatedBy") .HasColumnType("uuid"); b.Property("DeletedAt") .HasColumnType("timestamp with time zone"); b.Property("DeletedBy") .HasColumnType("uuid"); b.Property("Description") .HasMaxLength(512) .HasColumnType("character varying(512)"); b.Property("GroupId") .HasColumnType("uuid"); b.Property("IsDefault") .HasColumnType("boolean"); b.Property("IsEnabled") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(true); b.Property("Key") .IsRequired() .HasMaxLength(64) .HasColumnType("character varying(64)"); b.Property("SortOrder") .ValueGeneratedOnAdd() .HasColumnType("integer") .HasDefaultValue(100); b.Property("TenantId") .HasColumnType("uuid"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone"); b.Property("UpdatedBy") .HasColumnType("uuid"); b.Property("Value") .IsRequired() .HasMaxLength(256) .HasColumnType("character varying(256)"); b.HasKey("Id"); b.HasIndex("TenantId"); b.HasIndex("GroupId", "Key") .IsUnique(); b.ToTable("dictionary_items", (string)null); }); modelBuilder.Entity("TakeoutSaaS.Domain.Dictionary.Entities.DictionaryItem", b => { b.HasOne("TakeoutSaaS.Domain.Dictionary.Entities.DictionaryGroup", "Group") .WithMany("Items") .HasForeignKey("GroupId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Group"); }); modelBuilder.Entity("TakeoutSaaS.Domain.Dictionary.Entities.DictionaryGroup", b => { b.Navigation("Items"); }); #pragma warning restore 612, 618 } } }