Files
WCS/Cowain.TestProject/Migrations/20260122065225_init.Designer.cs
2026-03-02 09:08:20 +08:00

465 lines
16 KiB
C#

// <auto-generated />
using System;
using Cowain.TestProject.DBContext;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace Cowain.TestProject.Migrations
{
[DbContext(typeof(DBContextGenerator))]
[Migration("20260122065225_init")]
partial class init
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "9.0.0")
.HasAnnotation("Relational:MaxIdentifierLength", 64);
MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
modelBuilder.Entity("Cowain.Base.Models.Admins.UserDto", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<DateTime>("CreateTime")
.HasColumnType("datetime(6)");
b.Property<bool>("IsValid")
.HasColumnType("tinyint(1)");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("longtext");
b.Property<string>("Password")
.IsRequired()
.HasColumnType("longtext");
b.Property<string>("Phone")
.IsRequired()
.HasColumnType("longtext");
b.Property<int>("RoleId")
.HasColumnType("int");
b.Property<string>("Sex")
.IsRequired()
.HasColumnType("longtext");
b.Property<DateTime>("UpdateTime")
.HasColumnType("datetime(6)");
b.Property<string>("UserNumber")
.IsRequired()
.HasColumnType("longtext");
b.HasKey("Id");
b.ToTable("user");
b.HasData(
new
{
Id = 1,
CreateTime = new DateTime(2026, 1, 22, 14, 52, 24, 945, DateTimeKind.Local).AddTicks(547),
IsValid = true,
Name = "admin",
Password = "F44DDAC49CE7A95D",
Phone = "17625760609",
RoleId = 1,
Sex = "Male",
UpdateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
UserNumber = "CWA4483"
});
});
modelBuilder.Entity("Cowain.Base.Models.Admins.UserRoleDto", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<DateTime>("CreateTime")
.HasColumnType("datetime(6)");
b.Property<bool>("IsValid")
.HasColumnType("tinyint(1)");
b.Property<string>("RoleName")
.IsRequired()
.HasColumnType("longtext");
b.Property<DateTime>("UpdateTime")
.HasColumnType("datetime(6)");
b.HasKey("Id");
b.ToTable("user_role");
b.HasData(
new
{
Id = 1,
CreateTime = new DateTime(2026, 1, 22, 14, 52, 24, 949, DateTimeKind.Local).AddTicks(9102),
IsValid = true,
RoleName = "管理员",
UpdateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)
});
});
modelBuilder.Entity("Cowain.Base.Models.Admins.UserRoleMenuDto", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<string>("MenuActions")
.HasColumnType("longtext");
b.Property<string>("MenuKey")
.HasColumnType("longtext");
b.Property<int>("RoleId")
.HasColumnType("int");
b.HasKey("Id");
b.ToTable("user_role_menu");
b.HasData(
new
{
Id = 1,
MenuActions = "[]",
MenuKey = "Home",
RoleId = 1
},
new
{
Id = 2,
MenuActions = "[ \"add\", \"edit\", \"delete\"]",
MenuKey = "UserRoleSetting",
RoleId = 1
},
new
{
Id = 3,
MenuActions = "[ \"edit\", \"delete\"]",
MenuKey = "RoleMenuSetting",
RoleId = 1
},
new
{
Id = 4,
MenuActions = "[ \"add\", \"edit\", \"delete\"]",
MenuKey = "UserManagement",
RoleId = 1
});
});
modelBuilder.Entity("Plugin.Cowain.Driver.Models.Dto.AlarmGroupDto", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.HasKey("Id");
b.ToTable("alarm_group");
b.HasData(
new
{
Id = 1,
Name = "系统"
});
});
modelBuilder.Entity("Plugin.Cowain.Driver.Models.Dto.AlarmHistoryDto", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<string>("Desc")
.IsRequired()
.HasColumnType("longtext");
b.Property<int>("Group")
.HasColumnType("int");
b.Property<int>("Level")
.HasColumnType("int");
b.Property<DateTime>("StartTime")
.HasColumnType("datetime(6)");
b.Property<bool>("Status")
.HasColumnType("tinyint(1)");
b.Property<DateTime?>("StopTime")
.HasColumnType("datetime(6)");
b.Property<int>("TagId")
.HasColumnType("int");
b.HasKey("Id");
b.ToTable("alarm_history");
});
modelBuilder.Entity("Plugin.Cowain.Driver.Models.Dto.AlarmLevelDto", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<string>("Color")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.HasKey("Id");
b.ToTable("alarm_level");
b.HasData(
new
{
Id = 1,
Color = "Red",
Name = "报警"
},
new
{
Id = 2,
Color = "Yellow",
Name = "警告"
});
});
modelBuilder.Entity("Plugin.Cowain.Driver.Models.Dto.DeviceDto", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<DateTime>("CreateTime")
.HasColumnType("datetime(6)");
b.Property<string>("Desc")
.HasColumnType("longtext");
b.Property<string>("DeviceName")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("varchar(50)");
b.Property<string>("DeviceType")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("varchar(20)");
b.Property<string>("DriverName")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("varchar(50)");
b.Property<bool>("Enable")
.HasColumnType("tinyint(1)");
b.Property<string>("Param")
.IsRequired()
.HasColumnType("longtext");
b.Property<DateTime>("UpdateTime")
.HasColumnType("datetime(6)");
b.HasKey("Id");
b.ToTable("device");
});
modelBuilder.Entity("Plugin.Cowain.Driver.Models.Dto.TagAddressDto", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<string>("Address")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.Property<bool>("AlarmEnable")
.HasColumnType("tinyint(1)");
b.Property<int>("AlarmGroup")
.HasColumnType("int");
b.Property<int>("AlarmLevel")
.HasColumnType("int");
b.Property<string>("AlarmMsg")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("varchar(1000)");
b.Property<string>("AlarmValue")
.IsRequired()
.HasColumnType("longtext");
b.Property<int>("ArrayCount")
.HasColumnType("int");
b.Property<string>("DataType")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("varchar(50)");
b.Property<string>("Desc")
.IsRequired()
.HasColumnType("longtext");
b.Property<int>("DeviceId")
.HasColumnType("int");
b.Property<string>("Json")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("varchar(1000)");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.Property<string>("OperMode")
.IsRequired()
.HasColumnType("longtext");
b.HasKey("Id");
b.ToTable("tag_address");
b.HasData(
new
{
Id = 1,
Address = "ns=4;s=L1RSTemp_Output1[0]",
AlarmEnable = false,
AlarmGroup = 0,
AlarmLevel = 0,
AlarmMsg = "",
AlarmValue = "",
ArrayCount = 1,
DataType = "Int16",
Desc = "Tag1",
DeviceId = 1,
Json = "",
Name = "Tag1",
OperMode = "Read"
},
new
{
Id = 2,
Address = "ns=4;s=L1RSTemp_Output1[1]",
AlarmEnable = false,
AlarmGroup = 0,
AlarmLevel = 0,
AlarmMsg = "",
AlarmValue = "",
ArrayCount = 1,
DataType = "Int16",
Desc = "Tag2",
DeviceId = 1,
Json = "",
Name = "Tag2",
OperMode = "Read"
});
});
modelBuilder.Entity("Plugin.Cowain.Driver.Models.Dto.VarActionDto", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<string>("ActionName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.Property<string>("ActionValue")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.Property<string>("Condition")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.Property<string>("Desc")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("varchar(500)");
b.Property<int>("DeviceId")
.HasColumnType("int");
b.Property<string>("Param")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("varchar(1000)");
b.Property<int>("TagId")
.HasColumnType("int");
b.HasKey("Id");
b.ToTable("var_action");
});
#pragma warning restore 612, 618
}
}
}