173 lines
6.0 KiB
C#
173 lines
6.0 KiB
C#
// <auto-generated />
|
|
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
|
|
{
|
|
/// <inheritdoc />
|
|
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<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("Code")
|
|
.IsRequired()
|
|
.HasMaxLength(64)
|
|
.HasColumnType("character varying(64)");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<Guid?>("CreatedBy")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime?>("DeletedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<Guid?>("DeletedBy")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("Description")
|
|
.HasMaxLength(512)
|
|
.HasColumnType("character varying(512)");
|
|
|
|
b.Property<bool>("IsEnabled")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("boolean")
|
|
.HasDefaultValue(true);
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(128)
|
|
.HasColumnType("character varying(128)");
|
|
|
|
b.Property<int>("Scope")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<Guid>("TenantId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime?>("UpdatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<Guid?>("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<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<Guid?>("CreatedBy")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime?>("DeletedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<Guid?>("DeletedBy")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("Description")
|
|
.HasMaxLength(512)
|
|
.HasColumnType("character varying(512)");
|
|
|
|
b.Property<Guid>("GroupId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<bool>("IsDefault")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<bool>("IsEnabled")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("boolean")
|
|
.HasDefaultValue(true);
|
|
|
|
b.Property<string>("Key")
|
|
.IsRequired()
|
|
.HasMaxLength(64)
|
|
.HasColumnType("character varying(64)");
|
|
|
|
b.Property<int>("SortOrder")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer")
|
|
.HasDefaultValue(100);
|
|
|
|
b.Property<Guid>("TenantId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime?>("UpdatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<Guid?>("UpdatedBy")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("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
|
|
}
|
|
}
|
|
}
|