187 lines
7.6 KiB
C#
187 lines
7.6 KiB
C#
// <auto-generated />
|
||
using System;
|
||
using Microsoft.EntityFrameworkCore;
|
||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||
using TakeoutSaaS.Infrastructure.Identity.Persistence;
|
||
|
||
#nullable disable
|
||
|
||
namespace TakeoutSaaS.Infrastructure.Migrations.IdentityDb
|
||
{
|
||
[DbContext(typeof(IdentityDbContext))]
|
||
partial class IdentityDbContextModelSnapshot : ModelSnapshot
|
||
{
|
||
protected override void BuildModel(ModelBuilder modelBuilder)
|
||
{
|
||
#pragma warning disable 612, 618
|
||
modelBuilder
|
||
.HasAnnotation("ProductVersion", "10.0.0")
|
||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||
|
||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Identity.Entities.IdentityUser", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<string>("Account")
|
||
.IsRequired()
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("登录账号。");
|
||
|
||
b.Property<string>("Avatar")
|
||
.HasMaxLength(256)
|
||
.HasColumnType("character varying(256)")
|
||
.HasComment("头像地址。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<string>("DisplayName")
|
||
.IsRequired()
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("展示名称。");
|
||
|
||
b.Property<long?>("MerchantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属商户(平台管理员为空)。");
|
||
|
||
b.Property<string>("PasswordHash")
|
||
.IsRequired()
|
||
.HasMaxLength(256)
|
||
.HasColumnType("character varying(256)")
|
||
.HasComment("密码哈希。");
|
||
|
||
b.Property<string>("Permissions")
|
||
.IsRequired()
|
||
.HasColumnType("text")
|
||
.HasComment("权限集合。");
|
||
|
||
b.Property<string>("Roles")
|
||
.IsRequired()
|
||
.HasColumnType("text")
|
||
.HasComment("角色集合。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId");
|
||
|
||
b.HasIndex("TenantId", "Account")
|
||
.IsUnique();
|
||
|
||
b.ToTable("identity_users", null, t =>
|
||
{
|
||
t.HasComment("管理后台账户实体(平台管理员、租户管理员或商户员工)。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Identity.Entities.MiniUser", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<string>("Avatar")
|
||
.HasMaxLength(256)
|
||
.HasColumnType("character varying(256)")
|
||
.HasComment("头像地址。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<string>("Nickname")
|
||
.IsRequired()
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("昵称。");
|
||
|
||
b.Property<string>("OpenId")
|
||
.IsRequired()
|
||
.HasMaxLength(128)
|
||
.HasColumnType("character varying(128)")
|
||
.HasComment("微信 OpenId。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<string>("UnionId")
|
||
.HasMaxLength(128)
|
||
.HasColumnType("character varying(128)")
|
||
.HasComment("微信 UnionId,可能为空。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId");
|
||
|
||
b.HasIndex("TenantId", "OpenId")
|
||
.IsUnique();
|
||
|
||
b.ToTable("mini_users", null, t =>
|
||
{
|
||
t.HasComment("小程序用户实体。");
|
||
});
|
||
});
|
||
#pragma warning restore 612, 618
|
||
}
|
||
}
|
||
}
|