552 lines
19 KiB
C#
552 lines
19 KiB
C#
![]() |
// <auto-generated />
|
|||
|
using System;
|
|||
|
using IoTGateway.DataAccess;
|
|||
|
using Microsoft.EntityFrameworkCore;
|
|||
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|||
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|||
|
|
|||
|
#nullable disable
|
|||
|
|
|||
|
namespace IoTGateway.DataAccess.Migrations
|
|||
|
{
|
|||
|
[DbContext(typeof(DataContext))]
|
|||
|
[Migration("20221107035009_Init")]
|
|||
|
partial class Init
|
|||
|
{
|
|||
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|||
|
{
|
|||
|
#pragma warning disable 612, 618
|
|||
|
modelBuilder
|
|||
|
.HasAnnotation("ProductVersion", "6.0.10")
|
|||
|
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
|||
|
|
|||
|
modelBuilder.Entity("WalkingTec.Mvvm.Core.ActionLog", b =>
|
|||
|
{
|
|||
|
b.Property<Guid>("ID")
|
|||
|
.ValueGeneratedOnAdd()
|
|||
|
.HasColumnType("char(36)");
|
|||
|
|
|||
|
b.Property<string>("ActionName")
|
|||
|
.HasMaxLength(255)
|
|||
|
.HasColumnType("varchar(255)");
|
|||
|
|
|||
|
b.Property<DateTime>("ActionTime")
|
|||
|
.HasColumnType("datetime(6)");
|
|||
|
|
|||
|
b.Property<string>("ActionUrl")
|
|||
|
.HasMaxLength(250)
|
|||
|
.HasColumnType("varchar(250)");
|
|||
|
|
|||
|
b.Property<string>("CreateBy")
|
|||
|
.HasMaxLength(50)
|
|||
|
.HasColumnType("varchar(50)");
|
|||
|
|
|||
|
b.Property<DateTime?>("CreateTime")
|
|||
|
.HasColumnType("datetime(6)");
|
|||
|
|
|||
|
b.Property<double>("Duration")
|
|||
|
.HasColumnType("double");
|
|||
|
|
|||
|
b.Property<string>("IP")
|
|||
|
.HasMaxLength(50)
|
|||
|
.HasColumnType("varchar(50)");
|
|||
|
|
|||
|
b.Property<string>("ITCode")
|
|||
|
.HasMaxLength(50)
|
|||
|
.HasColumnType("varchar(50)");
|
|||
|
|
|||
|
b.Property<int>("LogType")
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
b.Property<string>("ModuleName")
|
|||
|
.HasMaxLength(255)
|
|||
|
.HasColumnType("varchar(255)");
|
|||
|
|
|||
|
b.Property<string>("Remark")
|
|||
|
.HasColumnType("longtext");
|
|||
|
|
|||
|
b.Property<string>("UpdateBy")
|
|||
|
.HasMaxLength(50)
|
|||
|
.HasColumnType("varchar(50)");
|
|||
|
|
|||
|
b.Property<DateTime?>("UpdateTime")
|
|||
|
.HasColumnType("datetime(6)");
|
|||
|
|
|||
|
b.HasKey("ID");
|
|||
|
|
|||
|
b.ToTable("ActionLogs");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("WalkingTec.Mvvm.Core.DataPrivilege", b =>
|
|||
|
{
|
|||
|
b.Property<Guid>("ID")
|
|||
|
.ValueGeneratedOnAdd()
|
|||
|
.HasColumnType("char(36)");
|
|||
|
|
|||
|
b.Property<string>("CreateBy")
|
|||
|
.HasMaxLength(50)
|
|||
|
.HasColumnType("varchar(50)");
|
|||
|
|
|||
|
b.Property<DateTime?>("CreateTime")
|
|||
|
.HasColumnType("datetime(6)");
|
|||
|
|
|||
|
b.Property<string>("Domain")
|
|||
|
.HasColumnType("longtext");
|
|||
|
|
|||
|
b.Property<string>("GroupCode")
|
|||
|
.HasColumnType("longtext");
|
|||
|
|
|||
|
b.Property<string>("RelateId")
|
|||
|
.HasColumnType("longtext");
|
|||
|
|
|||
|
b.Property<string>("TableName")
|
|||
|
.IsRequired()
|
|||
|
.HasMaxLength(50)
|
|||
|
.HasColumnType("varchar(50)");
|
|||
|
|
|||
|
b.Property<string>("UpdateBy")
|
|||
|
.HasMaxLength(50)
|
|||
|
.HasColumnType("varchar(50)");
|
|||
|
|
|||
|
b.Property<DateTime?>("UpdateTime")
|
|||
|
.HasColumnType("datetime(6)");
|
|||
|
|
|||
|
b.Property<string>("UserCode")
|
|||
|
.HasColumnType("longtext");
|
|||
|
|
|||
|
b.HasKey("ID");
|
|||
|
|
|||
|
b.ToTable("DataPrivileges");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("WalkingTec.Mvvm.Core.FileAttachment", b =>
|
|||
|
{
|
|||
|
b.Property<Guid>("ID")
|
|||
|
.ValueGeneratedOnAdd()
|
|||
|
.HasColumnType("char(36)");
|
|||
|
|
|||
|
b.Property<string>("ExtraInfo")
|
|||
|
.HasColumnType("longtext");
|
|||
|
|
|||
|
b.Property<byte[]>("FileData")
|
|||
|
.HasColumnType("longblob");
|
|||
|
|
|||
|
b.Property<string>("FileExt")
|
|||
|
.IsRequired()
|
|||
|
.HasMaxLength(10)
|
|||
|
.HasColumnType("varchar(10)");
|
|||
|
|
|||
|
b.Property<string>("FileName")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("longtext");
|
|||
|
|
|||
|
b.Property<string>("HandlerInfo")
|
|||
|
.HasColumnType("longtext");
|
|||
|
|
|||
|
b.Property<long>("Length")
|
|||
|
.HasColumnType("bigint");
|
|||
|
|
|||
|
b.Property<string>("Path")
|
|||
|
.HasColumnType("longtext");
|
|||
|
|
|||
|
b.Property<string>("SaveMode")
|
|||
|
.HasColumnType("longtext");
|
|||
|
|
|||
|
b.Property<DateTime>("UploadTime")
|
|||
|
.HasColumnType("datetime(6)");
|
|||
|
|
|||
|
b.HasKey("ID");
|
|||
|
|
|||
|
b.ToTable("FileAttachments");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("WalkingTec.Mvvm.Core.FrameworkGroup", b =>
|
|||
|
{
|
|||
|
b.Property<Guid>("ID")
|
|||
|
.ValueGeneratedOnAdd()
|
|||
|
.HasColumnType("char(36)");
|
|||
|
|
|||
|
b.Property<string>("CreateBy")
|
|||
|
.HasMaxLength(50)
|
|||
|
.HasColumnType("varchar(50)");
|
|||
|
|
|||
|
b.Property<DateTime?>("CreateTime")
|
|||
|
.HasColumnType("datetime(6)");
|
|||
|
|
|||
|
b.Property<string>("GroupCode")
|
|||
|
.IsRequired()
|
|||
|
.HasMaxLength(100)
|
|||
|
.HasColumnType("varchar(100)");
|
|||
|
|
|||
|
b.Property<string>("GroupName")
|
|||
|
.IsRequired()
|
|||
|
.HasMaxLength(50)
|
|||
|
.HasColumnType("varchar(50)");
|
|||
|
|
|||
|
b.Property<string>("GroupRemark")
|
|||
|
.HasColumnType("longtext");
|
|||
|
|
|||
|
b.Property<string>("TenantCode")
|
|||
|
.HasColumnType("longtext");
|
|||
|
|
|||
|
b.Property<string>("UpdateBy")
|
|||
|
.HasMaxLength(50)
|
|||
|
.HasColumnType("varchar(50)");
|
|||
|
|
|||
|
b.Property<DateTime?>("UpdateTime")
|
|||
|
.HasColumnType("datetime(6)");
|
|||
|
|
|||
|
b.HasKey("ID");
|
|||
|
|
|||
|
b.ToTable("FrameworkGroups");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("WalkingTec.Mvvm.Core.FrameworkMenu", b =>
|
|||
|
{
|
|||
|
b.Property<Guid>("ID")
|
|||
|
.ValueGeneratedOnAdd()
|
|||
|
.HasColumnType("char(36)");
|
|||
|
|
|||
|
b.Property<string>("ActionName")
|
|||
|
.HasColumnType("longtext");
|
|||
|
|
|||
|
b.Property<string>("ClassName")
|
|||
|
.HasColumnType("longtext");
|
|||
|
|
|||
|
b.Property<int?>("DisplayOrder")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
b.Property<string>("Domain")
|
|||
|
.HasColumnType("longtext");
|
|||
|
|
|||
|
b.Property<bool>("FolderOnly")
|
|||
|
.HasColumnType("tinyint(1)");
|
|||
|
|
|||
|
b.Property<string>("Icon")
|
|||
|
.HasMaxLength(50)
|
|||
|
.HasColumnType("varchar(50)");
|
|||
|
|
|||
|
b.Property<bool>("IsInherit")
|
|||
|
.HasColumnType("tinyint(1)");
|
|||
|
|
|||
|
b.Property<bool?>("IsInside")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("tinyint(1)");
|
|||
|
|
|||
|
b.Property<bool>("IsPublic")
|
|||
|
.HasColumnType("tinyint(1)");
|
|||
|
|
|||
|
b.Property<string>("MethodName")
|
|||
|
.HasColumnType("longtext");
|
|||
|
|
|||
|
b.Property<string>("ModuleName")
|
|||
|
.HasColumnType("longtext");
|
|||
|
|
|||
|
b.Property<string>("PageName")
|
|||
|
.IsRequired()
|
|||
|
.HasMaxLength(50)
|
|||
|
.HasColumnType("varchar(50)");
|
|||
|
|
|||
|
b.Property<Guid?>("ParentId")
|
|||
|
.HasColumnType("char(36)");
|
|||
|
|
|||
|
b.Property<bool>("ShowOnMenu")
|
|||
|
.HasColumnType("tinyint(1)");
|
|||
|
|
|||
|
b.Property<string>("Url")
|
|||
|
.HasColumnType("longtext");
|
|||
|
|
|||
|
b.HasKey("ID");
|
|||
|
|
|||
|
b.HasIndex("ParentId");
|
|||
|
|
|||
|
b.ToTable("FrameworkMenus");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("WalkingTec.Mvvm.Core.FrameworkRole", b =>
|
|||
|
{
|
|||
|
b.Property<Guid>("ID")
|
|||
|
.ValueGeneratedOnAdd()
|
|||
|
.HasColumnType("char(36)");
|
|||
|
|
|||
|
b.Property<string>("CreateBy")
|
|||
|
.HasMaxLength(50)
|
|||
|
.HasColumnType("varchar(50)");
|
|||
|
|
|||
|
b.Property<DateTime?>("CreateTime")
|
|||
|
.HasColumnType("datetime(6)");
|
|||
|
|
|||
|
b.Property<string>("RoleCode")
|
|||
|
.IsRequired()
|
|||
|
.HasMaxLength(100)
|
|||
|
.HasColumnType("varchar(100)");
|
|||
|
|
|||
|
b.Property<string>("RoleName")
|
|||
|
.IsRequired()
|
|||
|
.HasMaxLength(50)
|
|||
|
.HasColumnType("varchar(50)");
|
|||
|
|
|||
|
b.Property<string>("RoleRemark")
|
|||
|
.HasColumnType("longtext");
|
|||
|
|
|||
|
b.Property<string>("TenantCode")
|
|||
|
.HasColumnType("longtext");
|
|||
|
|
|||
|
b.Property<string>("UpdateBy")
|
|||
|
.HasMaxLength(50)
|
|||
|
.HasColumnType("varchar(50)");
|
|||
|
|
|||
|
b.Property<DateTime?>("UpdateTime")
|
|||
|
.HasColumnType("datetime(6)");
|
|||
|
|
|||
|
b.HasKey("ID");
|
|||
|
|
|||
|
b.ToTable("FrameworkRoles");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("WalkingTec.Mvvm.Core.FrameworkUser", b =>
|
|||
|
{
|
|||
|
b.Property<Guid>("ID")
|
|||
|
.ValueGeneratedOnAdd()
|
|||
|
.HasColumnType("char(36)");
|
|||
|
|
|||
|
b.Property<string>("Address")
|
|||
|
.HasMaxLength(200)
|
|||
|
.HasColumnType("varchar(200)");
|
|||
|
|
|||
|
b.Property<string>("CellPhone")
|
|||
|
.HasColumnType("longtext");
|
|||
|
|
|||
|
b.Property<string>("CreateBy")
|
|||
|
.HasMaxLength(50)
|
|||
|
.HasColumnType("varchar(50)");
|
|||
|
|
|||
|
b.Property<DateTime?>("CreateTime")
|
|||
|
.HasColumnType("datetime(6)");
|
|||
|
|
|||
|
b.Property<string>("Email")
|
|||
|
.HasMaxLength(50)
|
|||
|
.HasColumnType("varchar(50)");
|
|||
|
|
|||
|
b.Property<int?>("Gender")
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
b.Property<string>("HomePhone")
|
|||
|
.HasMaxLength(30)
|
|||
|
.HasColumnType("varchar(30)");
|
|||
|
|
|||
|
b.Property<string>("ITCode")
|
|||
|
.IsRequired()
|
|||
|
.HasMaxLength(50)
|
|||
|
.HasColumnType("varchar(50)");
|
|||
|
|
|||
|
b.Property<bool>("IsValid")
|
|||
|
.HasColumnType("tinyint(1)");
|
|||
|
|
|||
|
b.Property<string>("Name")
|
|||
|
.IsRequired()
|
|||
|
.HasMaxLength(50)
|
|||
|
.HasColumnType("varchar(50)");
|
|||
|
|
|||
|
b.Property<string>("Password")
|
|||
|
.IsRequired()
|
|||
|
.HasMaxLength(32)
|
|||
|
.HasColumnType("varchar(32)");
|
|||
|
|
|||
|
b.Property<Guid?>("PhotoId")
|
|||
|
.HasColumnType("char(36)");
|
|||
|
|
|||
|
b.Property<string>("TenantCode")
|
|||
|
.HasColumnType("longtext");
|
|||
|
|
|||
|
b.Property<string>("UpdateBy")
|
|||
|
.HasMaxLength(50)
|
|||
|
.HasColumnType("varchar(50)");
|
|||
|
|
|||
|
b.Property<DateTime?>("UpdateTime")
|
|||
|
.HasColumnType("datetime(6)");
|
|||
|
|
|||
|
b.Property<string>("ZipCode")
|
|||
|
.HasColumnType("longtext");
|
|||
|
|
|||
|
b.HasKey("ID");
|
|||
|
|
|||
|
b.HasIndex("PhotoId");
|
|||
|
|
|||
|
b.ToTable("FrameworkUsers");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("WalkingTec.Mvvm.Core.FrameworkUserGroup", b =>
|
|||
|
{
|
|||
|
b.Property<Guid>("ID")
|
|||
|
.ValueGeneratedOnAdd()
|
|||
|
.HasColumnType("char(36)");
|
|||
|
|
|||
|
b.Property<string>("CreateBy")
|
|||
|
.HasMaxLength(50)
|
|||
|
.HasColumnType("varchar(50)");
|
|||
|
|
|||
|
b.Property<DateTime?>("CreateTime")
|
|||
|
.HasColumnType("datetime(6)");
|
|||
|
|
|||
|
b.Property<string>("GroupCode")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("longtext");
|
|||
|
|
|||
|
b.Property<string>("UpdateBy")
|
|||
|
.HasMaxLength(50)
|
|||
|
.HasColumnType("varchar(50)");
|
|||
|
|
|||
|
b.Property<DateTime?>("UpdateTime")
|
|||
|
.HasColumnType("datetime(6)");
|
|||
|
|
|||
|
b.Property<string>("UserCode")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("longtext");
|
|||
|
|
|||
|
b.HasKey("ID");
|
|||
|
|
|||
|
b.ToTable("FrameworkUserGroups");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("WalkingTec.Mvvm.Core.FrameworkUserRole", b =>
|
|||
|
{
|
|||
|
b.Property<Guid>("ID")
|
|||
|
.ValueGeneratedOnAdd()
|
|||
|
.HasColumnType("char(36)");
|
|||
|
|
|||
|
b.Property<string>("CreateBy")
|
|||
|
.HasMaxLength(50)
|
|||
|
.HasColumnType("varchar(50)");
|
|||
|
|
|||
|
b.Property<DateTime?>("CreateTime")
|
|||
|
.HasColumnType("datetime(6)");
|
|||
|
|
|||
|
b.Property<string>("RoleCode")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("longtext");
|
|||
|
|
|||
|
b.Property<string>("UpdateBy")
|
|||
|
.HasMaxLength(50)
|
|||
|
.HasColumnType("varchar(50)");
|
|||
|
|
|||
|
b.Property<DateTime?>("UpdateTime")
|
|||
|
.HasColumnType("datetime(6)");
|
|||
|
|
|||
|
b.Property<string>("UserCode")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("longtext");
|
|||
|
|
|||
|
b.HasKey("ID");
|
|||
|
|
|||
|
b.ToTable("FrameworkUserRoles");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("WalkingTec.Mvvm.Core.FunctionPrivilege", b =>
|
|||
|
{
|
|||
|
b.Property<Guid>("ID")
|
|||
|
.ValueGeneratedOnAdd()
|
|||
|
.HasColumnType("char(36)");
|
|||
|
|
|||
|
b.Property<bool?>("Allowed")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("tinyint(1)");
|
|||
|
|
|||
|
b.Property<string>("CreateBy")
|
|||
|
.HasMaxLength(50)
|
|||
|
.HasColumnType("varchar(50)");
|
|||
|
|
|||
|
b.Property<DateTime?>("CreateTime")
|
|||
|
.HasColumnType("datetime(6)");
|
|||
|
|
|||
|
b.Property<Guid>("MenuItemId")
|
|||
|
.HasColumnType("char(36)");
|
|||
|
|
|||
|
b.Property<string>("RoleCode")
|
|||
|
.HasColumnType("longtext");
|
|||
|
|
|||
|
b.Property<string>("UpdateBy")
|
|||
|
.HasMaxLength(50)
|
|||
|
.HasColumnType("varchar(50)");
|
|||
|
|
|||
|
b.Property<DateTime?>("UpdateTime")
|
|||
|
.HasColumnType("datetime(6)");
|
|||
|
|
|||
|
b.HasKey("ID");
|
|||
|
|
|||
|
b.HasIndex("MenuItemId");
|
|||
|
|
|||
|
b.ToTable("FunctionPrivileges");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("WalkingTec.Mvvm.Core.PersistedGrant", b =>
|
|||
|
{
|
|||
|
b.Property<Guid>("ID")
|
|||
|
.ValueGeneratedOnAdd()
|
|||
|
.HasColumnType("char(36)");
|
|||
|
|
|||
|
b.Property<DateTime>("CreationTime")
|
|||
|
.HasColumnType("datetime(6)");
|
|||
|
|
|||
|
b.Property<DateTime>("Expiration")
|
|||
|
.HasColumnType("datetime(6)");
|
|||
|
|
|||
|
b.Property<string>("RefreshToken")
|
|||
|
.HasMaxLength(50)
|
|||
|
.HasColumnType("varchar(50)");
|
|||
|
|
|||
|
b.Property<string>("Type")
|
|||
|
.HasMaxLength(50)
|
|||
|
.HasColumnType("varchar(50)");
|
|||
|
|
|||
|
b.Property<string>("UserCode")
|
|||
|
.HasColumnType("longtext");
|
|||
|
|
|||
|
b.HasKey("ID");
|
|||
|
|
|||
|
b.ToTable("PersistedGrants");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("WalkingTec.Mvvm.Core.FrameworkMenu", b =>
|
|||
|
{
|
|||
|
b.HasOne("WalkingTec.Mvvm.Core.FrameworkMenu", "Parent")
|
|||
|
.WithMany("Children")
|
|||
|
.HasForeignKey("ParentId");
|
|||
|
|
|||
|
b.Navigation("Parent");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("WalkingTec.Mvvm.Core.FrameworkUser", b =>
|
|||
|
{
|
|||
|
b.HasOne("WalkingTec.Mvvm.Core.FileAttachment", "Photo")
|
|||
|
.WithMany()
|
|||
|
.HasForeignKey("PhotoId")
|
|||
|
.OnDelete(DeleteBehavior.Restrict);
|
|||
|
|
|||
|
b.Navigation("Photo");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("WalkingTec.Mvvm.Core.FunctionPrivilege", b =>
|
|||
|
{
|
|||
|
b.HasOne("WalkingTec.Mvvm.Core.FrameworkMenu", "MenuItem")
|
|||
|
.WithMany("Privileges")
|
|||
|
.HasForeignKey("MenuItemId")
|
|||
|
.OnDelete(DeleteBehavior.Cascade)
|
|||
|
.IsRequired();
|
|||
|
|
|||
|
b.Navigation("MenuItem");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("WalkingTec.Mvvm.Core.FrameworkMenu", b =>
|
|||
|
{
|
|||
|
b.Navigation("Children");
|
|||
|
|
|||
|
b.Navigation("Privileges");
|
|||
|
});
|
|||
|
#pragma warning restore 612, 618
|
|||
|
}
|
|||
|
}
|
|||
|
}
|