//
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("20260126032551_baking_model_edit")]
partial class baking_model_edit
{
///
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("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("CreateTime")
.HasColumnType("datetime(6)");
b.Property("IsValid")
.HasColumnType("tinyint(1)");
b.Property("Name")
.IsRequired()
.HasColumnType("longtext");
b.Property("Password")
.IsRequired()
.HasColumnType("longtext");
b.Property("Phone")
.IsRequired()
.HasColumnType("longtext");
b.Property("RoleId")
.HasColumnType("int");
b.Property("Sex")
.IsRequired()
.HasColumnType("longtext");
b.Property("UpdateTime")
.HasColumnType("datetime(6)");
b.Property("UserNumber")
.IsRequired()
.HasColumnType("longtext");
b.HasKey("Id");
b.ToTable("user");
b.HasData(
new
{
Id = 1,
CreateTime = new DateTime(2026, 1, 26, 11, 25, 51, 148, DateTimeKind.Local).AddTicks(7643),
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("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("CreateTime")
.HasColumnType("datetime(6)");
b.Property("IsValid")
.HasColumnType("tinyint(1)");
b.Property("RoleName")
.IsRequired()
.HasColumnType("longtext");
b.Property("UpdateTime")
.HasColumnType("datetime(6)");
b.HasKey("Id");
b.ToTable("user_role");
b.HasData(
new
{
Id = 1,
CreateTime = new DateTime(2026, 1, 26, 11, 25, 51, 165, DateTimeKind.Local).AddTicks(2827),
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("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("MenuActions")
.HasColumnType("longtext");
b.Property("MenuKey")
.HasColumnType("longtext");
b.Property("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.Baking.Models.Dto.BakingInfoDto", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("BindingId")
.HasColumnType("int");
b.Property("CreateTime")
.HasColumnType("datetime(6)");
b.Property("DataValue")
.HasColumnType("longtext");
b.Property("TagId")
.HasColumnType("int");
b.HasKey("Id");
b.ToTable("baking_info");
});
modelBuilder.Entity("Plugin.Cowain.Baking.Models.Dto.BakingVariableDto", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("StationId")
.HasColumnType("int");
b.Property("TagId")
.HasColumnType("int");
b.HasKey("Id");
b.ToTable("baking_variable");
});
modelBuilder.Entity("Plugin.Cowain.Baking.Models.Dto.BatteryInfoDto", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("Code")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.Property("IsWaterBattery")
.HasColumnType("tinyint(1)");
b.Property("PalletId")
.HasColumnType("int");
b.Property("ScanTime")
.HasColumnType("datetime(6)");
b.Property("Status")
.HasColumnType("int");
b.Property("WaterValue")
.HasColumnType("double");
b.HasKey("Id");
b.ToTable("battery_info");
});
modelBuilder.Entity("Plugin.Cowain.Baking.Models.Dto.PalletBindingDto", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("CreateTime")
.HasColumnType("datetime(6)");
b.Property("PalletId")
.HasColumnType("int");
b.HasKey("Id");
b.ToTable("pallet_binding");
});
modelBuilder.Entity("Plugin.Cowain.Baking.Models.Dto.PalletInfoDto", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("BakingEndTime")
.HasColumnType("datetime(6)");
b.Property("BakingStartTime")
.HasColumnType("datetime(6)");
b.Property("BindingId")
.HasColumnType("int");
b.Property("Code")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.Property("LoadingEndTime")
.HasColumnType("datetime(6)");
b.Property("LoadingStartTime")
.HasColumnType("datetime(6)");
b.Property("PalletStatus")
.HasColumnType("int");
b.Property("StationId")
.HasColumnType("int");
b.Property("UnLoadingTime")
.HasColumnType("datetime(6)");
b.Property("UpdateTime")
.HasColumnType("datetime(6)");
b.Property("WaterValue")
.HasColumnType("double");
b.HasKey("Id");
b.ToTable("pallet_info");
});
modelBuilder.Entity("Plugin.Cowain.Baking.Models.Dto.PalletInfoHistoryDto", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("BakingEndTime")
.HasColumnType("datetime(6)");
b.Property("BakingStartTime")
.HasColumnType("datetime(6)");
b.Property("Code")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.Property("HistoryTime")
.HasColumnType("datetime(6)");
b.Property("LoadingEndTime")
.HasColumnType("datetime(6)");
b.Property("LoadingStartTime")
.HasColumnType("datetime(6)");
b.Property("PalletStatus")
.HasColumnType("int");
b.Property("StationId")
.HasColumnType("int");
b.Property("UnLoadingTime")
.HasColumnType("datetime(6)");
b.Property("UpdateTime")
.HasColumnType("datetime(6)");
b.Property("WaterValue")
.HasColumnType("double");
b.HasKey("Id");
b.ToTable("pallet_info_history");
});
modelBuilder.Entity("Plugin.Cowain.Baking.Models.Dto.PalletStatusDto", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("Desc")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("varchar(500)");
b.Property("Name")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.HasKey("Id");
b.ToTable("pallet_status");
b.HasData(
new
{
Id = 1,
Desc = "新托盘",
Name = "New"
},
new
{
Id = 2,
Desc = "上料中",
Name = "Loading"
});
});
modelBuilder.Entity("Plugin.Cowain.Baking.Models.Dto.StationInfoDto", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("LayOutX")
.HasColumnType("int");
b.Property("LayOutY")
.HasColumnType("int");
b.Property("Name")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.HasKey("Id");
b.ToTable("station_info");
});
modelBuilder.Entity("Plugin.Cowain.Driver.Models.Dto.AlarmGroupDto", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("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("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("Desc")
.IsRequired()
.HasColumnType("longtext");
b.Property("Group")
.HasColumnType("int");
b.Property("Level")
.HasColumnType("int");
b.Property("StartTime")
.HasColumnType("datetime(6)");
b.Property("Status")
.HasColumnType("tinyint(1)");
b.Property("StopTime")
.HasColumnType("datetime(6)");
b.Property("TagId")
.HasColumnType("int");
b.HasKey("Id");
b.ToTable("alarm_history");
});
modelBuilder.Entity("Plugin.Cowain.Driver.Models.Dto.AlarmLevelDto", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("Color")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.Property("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("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("CreateTime")
.HasColumnType("datetime(6)");
b.Property("Desc")
.HasColumnType("longtext");
b.Property("DeviceName")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("varchar(50)");
b.Property("DeviceType")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("varchar(20)");
b.Property("DriverName")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("varchar(50)");
b.Property("Enable")
.HasColumnType("tinyint(1)");
b.Property("Param")
.IsRequired()
.HasColumnType("longtext");
b.Property("UpdateTime")
.HasColumnType("datetime(6)");
b.HasKey("Id");
b.ToTable("device");
});
modelBuilder.Entity("Plugin.Cowain.Driver.Models.Dto.TagAddressDto", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("Address")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.Property("AlarmEnable")
.HasColumnType("tinyint(1)");
b.Property("AlarmGroup")
.HasColumnType("int");
b.Property("AlarmLevel")
.HasColumnType("int");
b.Property("AlarmMsg")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("varchar(1000)");
b.Property("AlarmValue")
.IsRequired()
.HasColumnType("longtext");
b.Property("ArrayCount")
.HasColumnType("int");
b.Property("DataType")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("varchar(50)");
b.Property("Desc")
.IsRequired()
.HasColumnType("longtext");
b.Property("DeviceId")
.HasColumnType("int");
b.Property("Json")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("varchar(1000)");
b.Property("Name")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.Property("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("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
b.Property("ActionName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.Property("ActionValue")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.Property("Condition")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.Property("Desc")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("varchar(500)");
b.Property("DeviceId")
.HasColumnType("int");
b.Property("Param")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("varchar(1000)");
b.Property("TagId")
.HasColumnType("int");
b.HasKey("Id");
b.ToTable("var_action");
});
#pragma warning restore 612, 618
}
}
}