diff --git a/IoTGateway.DataAccess/DataContext.cs b/IoTGateway.DataAccess/DataContext.cs
index 9a3bc71..ac0dda7 100644
--- a/IoTGateway.DataAccess/DataContext.cs
+++ b/IoTGateway.DataAccess/DataContext.cs
@@ -80,7 +80,7 @@ namespace IoTGateway.DataAccess
{
public DataContext CreateDbContext(string[] args)
{
- return new DataContext("Data Source = ../IoTGateway/iotgateway.db", DBTypeEnum.SQLite);
+ return new DataContext("server=127.0.0.1;database=iotgateway;user=iot;CharSet=utf8mb4;password=iot123456;port=3306;Allow User Variables=True;", DBTypeEnum.MySql);
}
}
diff --git a/IoTGateway.DataAccess/Migrations/20211209085327_ini.Designer.cs b/IoTGateway.DataAccess/Migrations/20211209085327_ini.Designer.cs
deleted file mode 100644
index 01403ef..0000000
--- a/IoTGateway.DataAccess/Migrations/20211209085327_ini.Designer.cs
+++ /dev/null
@@ -1,794 +0,0 @@
-//
-using System;
-using IoTGateway.DataAccess;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-
-namespace IoTGateway.DataAccess.Migrations
-{
- [DbContext(typeof(DataContext))]
- [Migration("20211209085327_ini")]
- partial class ini
- {
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder
- .HasAnnotation("ProductVersion", "5.0.9");
-
- modelBuilder.Entity("IoTGateway.Model.Device", b =>
- {
- b.Property("ID")
- .ValueGeneratedOnAdd()
- .HasColumnType("TEXT");
-
- b.Property("AutoStart")
- .HasColumnType("INTEGER");
-
- b.Property("CreateBy")
- .HasColumnType("TEXT");
-
- b.Property("CreateTime")
- .HasColumnType("TEXT");
-
- b.Property("Description")
- .HasColumnType("TEXT");
-
- b.Property("DeviceName")
- .HasColumnType("TEXT");
-
- b.Property("DeviceTypeEnum")
- .HasColumnType("INTEGER");
-
- b.Property("DriverId")
- .HasColumnType("TEXT");
-
- b.Property("Index")
- .HasColumnType("INTEGER");
-
- b.Property("ParentId")
- .HasColumnType("TEXT");
-
- b.Property("UpdateBy")
- .HasColumnType("TEXT");
-
- b.Property("UpdateTime")
- .HasColumnType("TEXT");
-
- b.HasKey("ID");
-
- b.HasIndex("DriverId");
-
- b.HasIndex("ParentId");
-
- b.ToTable("Devices");
- });
-
- modelBuilder.Entity("IoTGateway.Model.DeviceConfig", b =>
- {
- b.Property("ID")
- .ValueGeneratedOnAdd()
- .HasColumnType("TEXT");
-
- b.Property("CreateBy")
- .HasMaxLength(50)
- .HasColumnType("TEXT");
-
- b.Property("CreateTime")
- .HasColumnType("TEXT");
-
- b.Property("Description")
- .HasColumnType("TEXT");
-
- b.Property("DeviceConfigName")
- .HasColumnType("TEXT");
-
- b.Property("DeviceId")
- .HasColumnType("TEXT");
-
- b.Property("EnumInfo")
- .HasColumnType("TEXT");
-
- b.Property("UpdateBy")
- .HasMaxLength(50)
- .HasColumnType("TEXT");
-
- b.Property("UpdateTime")
- .HasColumnType("TEXT");
-
- b.Property("Value")
- .HasColumnType("TEXT");
-
- b.HasKey("ID");
-
- b.HasIndex("DeviceId");
-
- b.ToTable("DeviceConfigs");
- });
-
- modelBuilder.Entity("IoTGateway.Model.DeviceVariable", b =>
- {
- b.Property("ID")
- .ValueGeneratedOnAdd()
- .HasColumnType("TEXT");
-
- b.Property("DataType")
- .HasColumnType("INTEGER");
-
- b.Property("Description")
- .HasColumnType("TEXT");
-
- b.Property("DeviceAddress")
- .HasColumnType("TEXT");
-
- b.Property("DeviceId")
- .HasColumnType("TEXT");
-
- b.Property("Method")
- .HasColumnType("TEXT");
-
- b.Property("Name")
- .HasColumnType("TEXT");
-
- b.Property("ProtectType")
- .HasColumnType("INTEGER");
-
- b.Property("ValueFactor")
- .HasColumnType("REAL");
-
- b.HasKey("ID");
-
- b.HasIndex("DeviceId");
-
- b.ToTable("DeviceVariables");
- });
-
- modelBuilder.Entity("IoTGateway.Model.Driver", b =>
- {
- b.Property("ID")
- .ValueGeneratedOnAdd()
- .HasColumnType("TEXT");
-
- b.Property("AssembleName")
- .HasColumnType("TEXT");
-
- b.Property("AuthorizesNum")
- .HasColumnType("INTEGER");
-
- b.Property("CreateBy")
- .HasMaxLength(50)
- .HasColumnType("TEXT");
-
- b.Property("CreateTime")
- .HasColumnType("TEXT");
-
- b.Property("DriverName")
- .HasColumnType("TEXT");
-
- b.Property("FileName")
- .HasColumnType("TEXT");
-
- b.Property("UpdateBy")
- .HasMaxLength(50)
- .HasColumnType("TEXT");
-
- b.Property("UpdateTime")
- .HasColumnType("TEXT");
-
- b.HasKey("ID");
-
- b.ToTable("Drivers");
- });
-
- modelBuilder.Entity("IoTGateway.Model.SystemConfig", b =>
- {
- b.Property("ID")
- .ValueGeneratedOnAdd()
- .HasColumnType("TEXT");
-
- b.Property("CreateBy")
- .HasMaxLength(50)
- .HasColumnType("TEXT");
-
- b.Property("CreateTime")
- .HasColumnType("TEXT");
-
- b.Property("GatewayName")
- .HasColumnType("TEXT");
-
- b.Property("MqttIp")
- .HasColumnType("TEXT");
-
- b.Property("MqttPort")
- .HasColumnType("INTEGER");
-
- b.Property("MqttUName")
- .HasColumnType("TEXT");
-
- b.Property("MqttUPwd")
- .HasColumnType("TEXT");
-
- b.Property("UpdateBy")
- .HasMaxLength(50)
- .HasColumnType("TEXT");
-
- b.Property("UpdateTime")
- .HasColumnType("TEXT");
-
- b.HasKey("ID");
-
- b.ToTable("SystemConfig");
- });
-
- modelBuilder.Entity("WalkingTec.Mvvm.Core.ActionLog", b =>
- {
- b.Property("ID")
- .ValueGeneratedOnAdd()
- .HasColumnType("TEXT");
-
- b.Property("ActionName")
- .HasMaxLength(255)
- .HasColumnType("TEXT");
-
- b.Property("ActionTime")
- .HasColumnType("TEXT");
-
- b.Property("ActionUrl")
- .HasMaxLength(250)
- .HasColumnType("TEXT");
-
- b.Property("CreateBy")
- .HasMaxLength(50)
- .HasColumnType("TEXT");
-
- b.Property("CreateTime")
- .HasColumnType("TEXT");
-
- b.Property("Duration")
- .HasColumnType("REAL");
-
- b.Property("IP")
- .HasMaxLength(50)
- .HasColumnType("TEXT");
-
- b.Property("ITCode")
- .HasMaxLength(50)
- .HasColumnType("TEXT");
-
- b.Property("LogType")
- .HasColumnType("INTEGER");
-
- b.Property("ModuleName")
- .HasMaxLength(255)
- .HasColumnType("TEXT");
-
- b.Property("Remark")
- .HasColumnType("TEXT");
-
- b.Property("UpdateBy")
- .HasMaxLength(50)
- .HasColumnType("TEXT");
-
- b.Property("UpdateTime")
- .HasColumnType("TEXT");
-
- b.HasKey("ID");
-
- b.ToTable("ActionLogs");
- });
-
- modelBuilder.Entity("WalkingTec.Mvvm.Core.DataPrivilege", b =>
- {
- b.Property("ID")
- .ValueGeneratedOnAdd()
- .HasColumnType("TEXT");
-
- b.Property("CreateBy")
- .HasMaxLength(50)
- .HasColumnType("TEXT");
-
- b.Property("CreateTime")
- .HasColumnType("TEXT");
-
- b.Property("Domain")
- .HasColumnType("TEXT");
-
- b.Property("GroupCode")
- .HasColumnType("TEXT");
-
- b.Property("RelateId")
- .HasColumnType("TEXT");
-
- b.Property("TableName")
- .IsRequired()
- .HasMaxLength(50)
- .HasColumnType("TEXT");
-
- b.Property("UpdateBy")
- .HasMaxLength(50)
- .HasColumnType("TEXT");
-
- b.Property("UpdateTime")
- .HasColumnType("TEXT");
-
- b.Property("UserCode")
- .HasColumnType("TEXT");
-
- b.HasKey("ID");
-
- b.ToTable("DataPrivileges");
- });
-
- modelBuilder.Entity("WalkingTec.Mvvm.Core.FileAttachment", b =>
- {
- b.Property("ID")
- .ValueGeneratedOnAdd()
- .HasColumnType("TEXT");
-
- b.Property("ExtraInfo")
- .HasColumnType("TEXT");
-
- b.Property("FileData")
- .HasColumnType("BLOB");
-
- b.Property("FileExt")
- .IsRequired()
- .HasMaxLength(10)
- .HasColumnType("TEXT");
-
- b.Property("FileName")
- .IsRequired()
- .HasColumnType("TEXT");
-
- b.Property("HandlerInfo")
- .HasColumnType("TEXT");
-
- b.Property("Length")
- .HasColumnType("INTEGER");
-
- b.Property("Path")
- .HasColumnType("TEXT");
-
- b.Property("SaveMode")
- .HasColumnType("TEXT");
-
- b.Property("UploadTime")
- .HasColumnType("TEXT");
-
- b.HasKey("ID");
-
- b.ToTable("FileAttachments");
- });
-
- modelBuilder.Entity("WalkingTec.Mvvm.Core.FrameworkGroup", b =>
- {
- b.Property("ID")
- .ValueGeneratedOnAdd()
- .HasColumnType("TEXT");
-
- b.Property("CreateBy")
- .HasMaxLength(50)
- .HasColumnType("TEXT");
-
- b.Property("CreateTime")
- .HasColumnType("TEXT");
-
- b.Property("GroupCode")
- .IsRequired()
- .HasMaxLength(100)
- .HasColumnType("TEXT");
-
- b.Property("GroupName")
- .IsRequired()
- .HasMaxLength(50)
- .HasColumnType("TEXT");
-
- b.Property("GroupRemark")
- .HasColumnType("TEXT");
-
- b.Property("TenantCode")
- .HasColumnType("TEXT");
-
- b.Property("UpdateBy")
- .HasMaxLength(50)
- .HasColumnType("TEXT");
-
- b.Property("UpdateTime")
- .HasColumnType("TEXT");
-
- b.HasKey("ID");
-
- b.ToTable("FrameworkGroups");
- });
-
- modelBuilder.Entity("WalkingTec.Mvvm.Core.FrameworkMenu", b =>
- {
- b.Property("ID")
- .ValueGeneratedOnAdd()
- .HasColumnType("TEXT");
-
- b.Property("ActionName")
- .HasColumnType("TEXT");
-
- b.Property("ClassName")
- .HasColumnType("TEXT");
-
- b.Property("DisplayOrder")
- .IsRequired()
- .HasColumnType("INTEGER");
-
- b.Property("Domain")
- .HasColumnType("TEXT");
-
- b.Property("FolderOnly")
- .HasColumnType("INTEGER");
-
- b.Property("Icon")
- .HasMaxLength(50)
- .HasColumnType("TEXT");
-
- b.Property("IsInherit")
- .HasColumnType("INTEGER");
-
- b.Property("IsInside")
- .IsRequired()
- .HasColumnType("INTEGER");
-
- b.Property("IsPublic")
- .HasColumnType("INTEGER");
-
- b.Property("MethodName")
- .HasColumnType("TEXT");
-
- b.Property("ModuleName")
- .HasColumnType("TEXT");
-
- b.Property("PageName")
- .IsRequired()
- .HasMaxLength(50)
- .HasColumnType("TEXT");
-
- b.Property("ParentId")
- .HasColumnType("TEXT");
-
- b.Property("ShowOnMenu")
- .HasColumnType("INTEGER");
-
- b.Property("Url")
- .HasColumnType("TEXT");
-
- b.HasKey("ID");
-
- b.HasIndex("ParentId");
-
- b.ToTable("FrameworkMenus");
- });
-
- modelBuilder.Entity("WalkingTec.Mvvm.Core.FrameworkRole", b =>
- {
- b.Property("ID")
- .ValueGeneratedOnAdd()
- .HasColumnType("TEXT");
-
- b.Property("CreateBy")
- .HasMaxLength(50)
- .HasColumnType("TEXT");
-
- b.Property("CreateTime")
- .HasColumnType("TEXT");
-
- b.Property("RoleCode")
- .IsRequired()
- .HasMaxLength(100)
- .HasColumnType("TEXT");
-
- b.Property("RoleName")
- .IsRequired()
- .HasMaxLength(50)
- .HasColumnType("TEXT");
-
- b.Property("RoleRemark")
- .HasColumnType("TEXT");
-
- b.Property("TenantCode")
- .HasColumnType("TEXT");
-
- b.Property("UpdateBy")
- .HasMaxLength(50)
- .HasColumnType("TEXT");
-
- b.Property("UpdateTime")
- .HasColumnType("TEXT");
-
- b.HasKey("ID");
-
- b.ToTable("FrameworkRoles");
- });
-
- modelBuilder.Entity("WalkingTec.Mvvm.Core.FrameworkUser", b =>
- {
- b.Property("ID")
- .ValueGeneratedOnAdd()
- .HasColumnType("TEXT");
-
- b.Property("Address")
- .HasMaxLength(200)
- .HasColumnType("TEXT");
-
- b.Property("CellPhone")
- .HasColumnType("TEXT");
-
- b.Property("CreateBy")
- .HasMaxLength(50)
- .HasColumnType("TEXT");
-
- b.Property("CreateTime")
- .HasColumnType("TEXT");
-
- b.Property("Email")
- .HasMaxLength(50)
- .HasColumnType("TEXT");
-
- b.Property("Gender")
- .HasColumnType("INTEGER");
-
- b.Property("HomePhone")
- .HasMaxLength(30)
- .HasColumnType("TEXT");
-
- b.Property("ITCode")
- .IsRequired()
- .HasMaxLength(50)
- .HasColumnType("TEXT");
-
- b.Property("IsValid")
- .HasColumnType("INTEGER");
-
- b.Property("Name")
- .IsRequired()
- .HasMaxLength(50)
- .HasColumnType("TEXT");
-
- b.Property("Password")
- .IsRequired()
- .HasMaxLength(32)
- .HasColumnType("TEXT");
-
- b.Property("PhotoId")
- .HasColumnType("TEXT");
-
- b.Property("TenantCode")
- .HasColumnType("TEXT");
-
- b.Property("UpdateBy")
- .HasMaxLength(50)
- .HasColumnType("TEXT");
-
- b.Property("UpdateTime")
- .HasColumnType("TEXT");
-
- b.Property("ZipCode")
- .HasColumnType("TEXT");
-
- b.HasKey("ID");
-
- b.HasIndex("PhotoId");
-
- b.ToTable("FrameworkUsers");
- });
-
- modelBuilder.Entity("WalkingTec.Mvvm.Core.FrameworkUserGroup", b =>
- {
- b.Property("ID")
- .ValueGeneratedOnAdd()
- .HasColumnType("TEXT");
-
- b.Property("CreateBy")
- .HasMaxLength(50)
- .HasColumnType("TEXT");
-
- b.Property("CreateTime")
- .HasColumnType("TEXT");
-
- b.Property("GroupCode")
- .IsRequired()
- .HasColumnType("TEXT");
-
- b.Property("UpdateBy")
- .HasMaxLength(50)
- .HasColumnType("TEXT");
-
- b.Property("UpdateTime")
- .HasColumnType("TEXT");
-
- b.Property("UserCode")
- .IsRequired()
- .HasColumnType("TEXT");
-
- b.HasKey("ID");
-
- b.ToTable("FrameworkUserGroups");
- });
-
- modelBuilder.Entity("WalkingTec.Mvvm.Core.FrameworkUserRole", b =>
- {
- b.Property("ID")
- .ValueGeneratedOnAdd()
- .HasColumnType("TEXT");
-
- b.Property("CreateBy")
- .HasMaxLength(50)
- .HasColumnType("TEXT");
-
- b.Property("CreateTime")
- .HasColumnType("TEXT");
-
- b.Property("RoleCode")
- .IsRequired()
- .HasColumnType("TEXT");
-
- b.Property("UpdateBy")
- .HasMaxLength(50)
- .HasColumnType("TEXT");
-
- b.Property("UpdateTime")
- .HasColumnType("TEXT");
-
- b.Property("UserCode")
- .IsRequired()
- .HasColumnType("TEXT");
-
- b.HasKey("ID");
-
- b.ToTable("FrameworkUserRoles");
- });
-
- modelBuilder.Entity("WalkingTec.Mvvm.Core.FunctionPrivilege", b =>
- {
- b.Property("ID")
- .ValueGeneratedOnAdd()
- .HasColumnType("TEXT");
-
- b.Property("Allowed")
- .IsRequired()
- .HasColumnType("INTEGER");
-
- b.Property("CreateBy")
- .HasMaxLength(50)
- .HasColumnType("TEXT");
-
- b.Property("CreateTime")
- .HasColumnType("TEXT");
-
- b.Property("MenuItemId")
- .HasColumnType("TEXT");
-
- b.Property("RoleCode")
- .HasColumnType("TEXT");
-
- b.Property("UpdateBy")
- .HasMaxLength(50)
- .HasColumnType("TEXT");
-
- b.Property("UpdateTime")
- .HasColumnType("TEXT");
-
- b.HasKey("ID");
-
- b.HasIndex("MenuItemId");
-
- b.ToTable("FunctionPrivileges");
- });
-
- modelBuilder.Entity("WalkingTec.Mvvm.Core.PersistedGrant", b =>
- {
- b.Property("ID")
- .ValueGeneratedOnAdd()
- .HasColumnType("TEXT");
-
- b.Property("CreationTime")
- .HasColumnType("TEXT");
-
- b.Property("Expiration")
- .HasColumnType("TEXT");
-
- b.Property("RefreshToken")
- .HasMaxLength(50)
- .HasColumnType("TEXT");
-
- b.Property("Type")
- .HasMaxLength(50)
- .HasColumnType("TEXT");
-
- b.Property("UserCode")
- .HasColumnType("TEXT");
-
- b.HasKey("ID");
-
- b.ToTable("PersistedGrants");
- });
-
- modelBuilder.Entity("IoTGateway.Model.Device", b =>
- {
- b.HasOne("IoTGateway.Model.Driver", "Driver")
- .WithMany()
- .HasForeignKey("DriverId");
-
- b.HasOne("IoTGateway.Model.Device", "Parent")
- .WithMany("Children")
- .HasForeignKey("ParentId");
-
- b.Navigation("Driver");
-
- b.Navigation("Parent");
- });
-
- modelBuilder.Entity("IoTGateway.Model.DeviceConfig", b =>
- {
- b.HasOne("IoTGateway.Model.Device", "Device")
- .WithMany("DeviceConfigs")
- .HasForeignKey("DeviceId");
-
- b.Navigation("Device");
- });
-
- modelBuilder.Entity("IoTGateway.Model.DeviceVariable", b =>
- {
- b.HasOne("IoTGateway.Model.Device", "Device")
- .WithMany("DeviceVariables")
- .HasForeignKey("DeviceId");
-
- b.Navigation("Device");
- });
-
- 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("IoTGateway.Model.Device", b =>
- {
- b.Navigation("Children");
-
- b.Navigation("DeviceConfigs");
-
- b.Navigation("DeviceVariables");
- });
-
- modelBuilder.Entity("WalkingTec.Mvvm.Core.FrameworkMenu", b =>
- {
- b.Navigation("Children");
-
- b.Navigation("Privileges");
- });
-#pragma warning restore 612, 618
- }
- }
-}
diff --git a/IoTGateway.DataAccess/Migrations/20211209085327_ini.cs b/IoTGateway.DataAccess/Migrations/20211209085327_ini.cs
deleted file mode 100644
index d73d422..0000000
--- a/IoTGateway.DataAccess/Migrations/20211209085327_ini.cs
+++ /dev/null
@@ -1,462 +0,0 @@
-using System;
-using Microsoft.EntityFrameworkCore.Migrations;
-
-namespace IoTGateway.DataAccess.Migrations
-{
- public partial class ini : Migration
- {
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.CreateTable(
- name: "ActionLogs",
- columns: table => new
- {
- ID = table.Column(type: "TEXT", nullable: false),
- ModuleName = table.Column(type: "TEXT", maxLength: 255, nullable: true),
- ActionName = table.Column(type: "TEXT", maxLength: 255, nullable: true),
- ITCode = table.Column(type: "TEXT", maxLength: 50, nullable: true),
- ActionUrl = table.Column(type: "TEXT", maxLength: 250, nullable: true),
- ActionTime = table.Column(type: "TEXT", nullable: false),
- Duration = table.Column(type: "REAL", nullable: false),
- Remark = table.Column(type: "TEXT", nullable: true),
- IP = table.Column(type: "TEXT", maxLength: 50, nullable: true),
- LogType = table.Column(type: "INTEGER", nullable: false),
- CreateTime = table.Column(type: "TEXT", nullable: true),
- CreateBy = table.Column(type: "TEXT", maxLength: 50, nullable: true),
- UpdateTime = table.Column(type: "TEXT", nullable: true),
- UpdateBy = table.Column(type: "TEXT", maxLength: 50, nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_ActionLogs", x => x.ID);
- });
-
- migrationBuilder.CreateTable(
- name: "DataPrivileges",
- columns: table => new
- {
- ID = table.Column(type: "TEXT", nullable: false),
- UserCode = table.Column(type: "TEXT", nullable: true),
- GroupCode = table.Column(type: "TEXT", nullable: true),
- TableName = table.Column(type: "TEXT", maxLength: 50, nullable: false),
- RelateId = table.Column(type: "TEXT", nullable: true),
- Domain = table.Column(type: "TEXT", nullable: true),
- CreateTime = table.Column(type: "TEXT", nullable: true),
- CreateBy = table.Column(type: "TEXT", maxLength: 50, nullable: true),
- UpdateTime = table.Column(type: "TEXT", nullable: true),
- UpdateBy = table.Column(type: "TEXT", maxLength: 50, nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_DataPrivileges", x => x.ID);
- });
-
- migrationBuilder.CreateTable(
- name: "Drivers",
- columns: table => new
- {
- ID = table.Column(type: "TEXT", nullable: false),
- DriverName = table.Column(type: "TEXT", nullable: true),
- FileName = table.Column(type: "TEXT", nullable: true),
- AssembleName = table.Column(type: "TEXT", nullable: true),
- AuthorizesNum = table.Column(type: "INTEGER", nullable: false),
- CreateTime = table.Column(type: "TEXT", nullable: true),
- CreateBy = table.Column(type: "TEXT", maxLength: 50, nullable: true),
- UpdateTime = table.Column(type: "TEXT", nullable: true),
- UpdateBy = table.Column(type: "TEXT", maxLength: 50, nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Drivers", x => x.ID);
- });
-
- migrationBuilder.CreateTable(
- name: "FileAttachments",
- columns: table => new
- {
- ID = table.Column(type: "TEXT", nullable: false),
- FileName = table.Column(type: "TEXT", nullable: false),
- FileExt = table.Column(type: "TEXT", maxLength: 10, nullable: false),
- Path = table.Column(type: "TEXT", nullable: true),
- Length = table.Column(type: "INTEGER", nullable: false),
- UploadTime = table.Column(type: "TEXT", nullable: false),
- SaveMode = table.Column(type: "TEXT", nullable: true),
- FileData = table.Column(type: "BLOB", nullable: true),
- ExtraInfo = table.Column(type: "TEXT", nullable: true),
- HandlerInfo = table.Column(type: "TEXT", nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_FileAttachments", x => x.ID);
- });
-
- migrationBuilder.CreateTable(
- name: "FrameworkGroups",
- columns: table => new
- {
- ID = table.Column(type: "TEXT", nullable: false),
- GroupCode = table.Column(type: "TEXT", maxLength: 100, nullable: false),
- GroupName = table.Column(type: "TEXT", maxLength: 50, nullable: false),
- GroupRemark = table.Column(type: "TEXT", nullable: true),
- TenantCode = table.Column(type: "TEXT", nullable: true),
- CreateTime = table.Column(type: "TEXT", nullable: true),
- CreateBy = table.Column(type: "TEXT", maxLength: 50, nullable: true),
- UpdateTime = table.Column(type: "TEXT", nullable: true),
- UpdateBy = table.Column(type: "TEXT", maxLength: 50, nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_FrameworkGroups", x => x.ID);
- });
-
- migrationBuilder.CreateTable(
- name: "FrameworkMenus",
- columns: table => new
- {
- ID = table.Column(type: "TEXT", nullable: false),
- PageName = table.Column(type: "TEXT", maxLength: 50, nullable: false),
- ActionName = table.Column(type: "TEXT", nullable: true),
- ModuleName = table.Column(type: "TEXT", nullable: true),
- FolderOnly = table.Column(type: "INTEGER", nullable: false),
- IsInherit = table.Column(type: "INTEGER", nullable: false),
- ClassName = table.Column(type: "TEXT", nullable: true),
- MethodName = table.Column(type: "TEXT", nullable: true),
- Domain = table.Column(type: "TEXT", nullable: true),
- ShowOnMenu = table.Column(type: "INTEGER", nullable: false),
- IsPublic = table.Column(type: "INTEGER", nullable: false),
- DisplayOrder = table.Column(type: "INTEGER", nullable: false),
- IsInside = table.Column(type: "INTEGER", nullable: false),
- Url = table.Column(type: "TEXT", nullable: true),
- Icon = table.Column(type: "TEXT", maxLength: 50, nullable: true),
- ParentId = table.Column(type: "TEXT", nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_FrameworkMenus", x => x.ID);
- table.ForeignKey(
- name: "FK_FrameworkMenus_FrameworkMenus_ParentId",
- column: x => x.ParentId,
- principalTable: "FrameworkMenus",
- principalColumn: "ID",
- onDelete: ReferentialAction.Restrict);
- });
-
- migrationBuilder.CreateTable(
- name: "FrameworkRoles",
- columns: table => new
- {
- ID = table.Column(type: "TEXT", nullable: false),
- RoleCode = table.Column(type: "TEXT", maxLength: 100, nullable: false),
- RoleName = table.Column(type: "TEXT", maxLength: 50, nullable: false),
- RoleRemark = table.Column(type: "TEXT", nullable: true),
- TenantCode = table.Column(type: "TEXT", nullable: true),
- CreateTime = table.Column(type: "TEXT", nullable: true),
- CreateBy = table.Column(type: "TEXT", maxLength: 50, nullable: true),
- UpdateTime = table.Column(type: "TEXT", nullable: true),
- UpdateBy = table.Column(type: "TEXT", maxLength: 50, nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_FrameworkRoles", x => x.ID);
- });
-
- migrationBuilder.CreateTable(
- name: "FrameworkUserGroups",
- columns: table => new
- {
- ID = table.Column(type: "TEXT", nullable: false),
- UserCode = table.Column(type: "TEXT", nullable: false),
- GroupCode = table.Column(type: "TEXT", nullable: false),
- CreateTime = table.Column(type: "TEXT", nullable: true),
- CreateBy = table.Column(type: "TEXT", maxLength: 50, nullable: true),
- UpdateTime = table.Column(type: "TEXT", nullable: true),
- UpdateBy = table.Column(type: "TEXT", maxLength: 50, nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_FrameworkUserGroups", x => x.ID);
- });
-
- migrationBuilder.CreateTable(
- name: "FrameworkUserRoles",
- columns: table => new
- {
- ID = table.Column(type: "TEXT", nullable: false),
- UserCode = table.Column(type: "TEXT", nullable: false),
- RoleCode = table.Column(type: "TEXT", nullable: false),
- CreateTime = table.Column(type: "TEXT", nullable: true),
- CreateBy = table.Column(type: "TEXT", maxLength: 50, nullable: true),
- UpdateTime = table.Column(type: "TEXT", nullable: true),
- UpdateBy = table.Column(type: "TEXT", maxLength: 50, nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_FrameworkUserRoles", x => x.ID);
- });
-
- migrationBuilder.CreateTable(
- name: "PersistedGrants",
- columns: table => new
- {
- ID = table.Column