Files
Migu2.0/MiGu.DB/Migrations/Sqlite/20260727070415_AddFleetTables.Designer.cs
T
wei.wu 1f72488a8d 新增车辆表及OTA权限与逻辑优化
新增车辆任务与报警表,完善实体与DbContext配置。细化OTA权限校验,增强回传会话IP安全。优化OTA上传与设置面板,调度器支持重启恢复。报警采集逻辑支持历史分段。
2026-07-27 15:12:14 +08:00

1883 lines
65 KiB
C#

// <auto-generated />
using System;
using MiGu.DB.Kernel.Context;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace MiGu.DB.Migrations.Sqlite
{
[DbContext(typeof(MiGuDbContext))]
[Migration("20260727070415_AddFleetTables")]
partial class AddFleetTables
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "8.0.10");
modelBuilder.Entity("MiGu.DB.Domains.Dashboard.UserDashboardShortcut", b =>
{
b.Property<string>("UserId")
.HasMaxLength(64)
.HasColumnType("TEXT")
.HasColumnName("user_id");
b.Property<string>("Scope")
.HasMaxLength(32)
.HasColumnType("TEXT")
.HasColumnName("scope");
b.Property<string>("KeysJson")
.IsRequired()
.HasColumnType("text")
.HasColumnName("keys_json");
b.Property<string>("UpdatedAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT")
.HasColumnName("updated_at");
b.HasKey("UserId", "Scope");
b.ToTable("user_dashboard_shortcuts", (string)null);
});
modelBuilder.Entity("MiGu.DB.Domains.Fleet.CdmTaskRecord", b =>
{
b.Property<string>("Id")
.HasMaxLength(64)
.HasColumnType("TEXT")
.HasColumnName("id");
b.Property<int?>("CarId")
.HasColumnType("INTEGER")
.HasColumnName("car_id");
b.Property<string>("CarName")
.HasMaxLength(128)
.HasColumnType("TEXT")
.HasColumnName("car_name");
b.Property<string>("CreateTime")
.HasMaxLength(40)
.HasColumnType("TEXT")
.HasColumnName("create_time");
b.Property<string>("DstLabel")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("TEXT")
.HasColumnName("dst_label");
b.Property<int>("DstSiteId")
.HasColumnType("INTEGER")
.HasColumnName("dst_site_id");
b.Property<string>("FinishTime")
.HasMaxLength(40)
.HasColumnType("TEXT")
.HasColumnName("finish_time");
b.Property<string>("FirstSeenAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT")
.HasColumnName("first_seen_at");
b.Property<string>("LastSeenAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT")
.HasColumnName("last_seen_at");
b.Property<int>("MissionId")
.HasColumnType("INTEGER")
.HasColumnName("mission_id");
b.Property<string>("MissionName")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT")
.HasColumnName("mission_name");
b.Property<string>("MissionTypeName")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT")
.HasColumnName("mission_type");
b.Property<bool>("Overdue")
.HasColumnType("INTEGER")
.HasColumnName("overdue");
b.Property<int>("Priority")
.HasColumnType("INTEGER")
.HasColumnName("priority");
b.Property<string>("SrcLabel")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("TEXT")
.HasColumnName("src_label");
b.Property<int>("SrcSiteId")
.HasColumnType("INTEGER")
.HasColumnName("src_site_id");
b.Property<string>("StartTime")
.HasMaxLength(40)
.HasColumnType("TEXT")
.HasColumnName("start_time");
b.Property<string>("Status")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("TEXT")
.HasColumnName("status");
b.Property<string>("StatusCode")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("TEXT")
.HasColumnName("status_code");
b.Property<string>("StuckReason")
.HasMaxLength(512)
.HasColumnType("TEXT")
.HasColumnName("stuck_reason");
b.Property<string>("TaskId")
.HasMaxLength(128)
.HasColumnType("TEXT")
.HasColumnName("task_id");
b.HasKey("Id");
b.HasIndex("CreateTime");
b.HasIndex("StatusCode");
b.ToTable("cdm_tasks", (string)null);
});
modelBuilder.Entity("MiGu.DB.Domains.Fleet.VehicleAlarmRecord", b =>
{
b.Property<string>("Id")
.HasMaxLength(36)
.HasColumnType("TEXT")
.HasColumnName("id");
b.Property<bool>("Acknowledged")
.HasColumnType("INTEGER")
.HasColumnName("acknowledged");
b.Property<string>("AcknowledgedAt")
.HasMaxLength(40)
.HasColumnType("TEXT")
.HasColumnName("acknowledged_at");
b.Property<string>("AcknowledgedBy")
.HasMaxLength(128)
.HasColumnType("TEXT")
.HasColumnName("acknowledged_by");
b.Property<int>("CarId")
.HasColumnType("INTEGER")
.HasColumnName("car_id");
b.Property<string>("CarName")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT")
.HasColumnName("car_name");
b.Property<long?>("DurationSecs")
.HasColumnType("INTEGER")
.HasColumnName("duration_secs");
b.Property<string>("FirstAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT")
.HasColumnName("first_at");
b.Property<string>("Info")
.IsRequired()
.HasColumnType("text")
.HasColumnName("info");
b.Property<string>("LastAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT")
.HasColumnName("last_at");
b.Property<int>("Level")
.HasColumnType("INTEGER")
.HasColumnName("level");
b.Property<string>("ResolvedAt")
.HasMaxLength(40)
.HasColumnType("TEXT")
.HasColumnName("resolved_at");
b.Property<string>("Status")
.IsRequired()
.HasMaxLength(16)
.HasColumnType("TEXT")
.HasColumnName("status");
b.HasKey("Id");
b.HasIndex("FirstAt");
b.HasIndex("Status");
b.HasIndex("CarId", "Status");
b.ToTable("vehicle_alarms", (string)null);
});
modelBuilder.Entity("MiGu.DB.Domains.SimpleFields.SimpleField", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd()
.HasMaxLength(36)
.HasColumnType("TEXT")
.HasColumnName("id");
b.Property<string>("CarType")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT")
.HasColumnName("car_type");
b.Property<string>("Chinese")
.HasMaxLength(256)
.HasColumnType("TEXT")
.HasColumnName("chinese");
b.Property<string>("CreateTime")
.IsRequired()
.HasMaxLength(19)
.HasColumnType("TEXT")
.HasColumnName("create_time");
b.Property<string>("DataType")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT")
.HasColumnName("data_type");
b.Property<string>("English")
.HasMaxLength(256)
.HasColumnType("TEXT")
.HasColumnName("english");
b.Property<string>("FieldType")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT")
.HasColumnName("field_type");
b.Property<bool>("IsDefault")
.HasColumnType("INTEGER")
.HasColumnName("is_default");
b.Property<string>("Key")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT")
.HasColumnName("key");
b.Property<string>("Other")
.IsRequired()
.HasMaxLength(512)
.HasColumnType("TEXT")
.HasColumnName("other");
b.Property<string>("UpdateTime")
.IsRequired()
.HasMaxLength(19)
.HasColumnType("TEXT")
.HasColumnName("update_time");
b.Property<string>("Value")
.IsRequired()
.HasColumnType("TEXT")
.HasColumnName("value");
b.HasKey("Id");
b.HasIndex("CarType", "FieldType", "Key")
.IsUnique();
b.ToTable("simple_fields", (string)null);
});
modelBuilder.Entity("MiGu.DB.Domains.Transport.WmsTransportReservation", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property<string>("ContainerId")
.IsRequired()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property<string>("CreatedAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property<string>("CreatedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<string>("DeletedAt")
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property<string>("DeletedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<string>("ExpiresAt")
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property<string>("Extend")
.IsRequired()
.HasColumnType("text");
b.Property<bool>("IsDeleted")
.HasColumnType("INTEGER");
b.Property<bool>("IsLock")
.HasColumnType("INTEGER")
.HasColumnName("IsLock");
b.Property<string>("Remark")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("TEXT");
b.Property<string>("SourceStorageId")
.IsRequired()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property<string>("Status")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("TEXT");
b.Property<string>("TargetStorageId")
.IsRequired()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property<string>("TaskId")
.IsRequired()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property<string>("UpdatedAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property<string>("UpdatedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<long>("Version")
.IsConcurrencyToken()
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("ContainerId", "Status");
b.HasIndex("TargetStorageId", "Status");
b.ToTable("wms_transport_reservations", (string)null);
});
modelBuilder.Entity("MiGu.DB.Domains.Transport.WmsTransportRule", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property<string>("Code")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property<string>("CreatedAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property<string>("CreatedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<string>("DeletedAt")
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property<string>("DeletedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<bool>("Enabled")
.HasColumnType("INTEGER");
b.Property<string>("Extend")
.IsRequired()
.HasColumnType("text");
b.Property<bool>("IsDeleted")
.HasColumnType("INTEGER");
b.Property<bool>("IsLock")
.HasColumnType("INTEGER")
.HasColumnName("IsLock");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<int>("Priority")
.HasColumnType("INTEGER");
b.Property<string>("Remark")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("TEXT");
b.Property<string>("SourceSelectorJson")
.IsRequired()
.HasColumnType("text");
b.Property<string>("TargetSelectorJson")
.IsRequired()
.HasColumnType("text");
b.Property<string>("TaskOptionsJson")
.IsRequired()
.HasColumnType("text");
b.Property<string>("TriggerType")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("TEXT");
b.Property<string>("UpdatedAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property<string>("UpdatedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<long>("Version")
.IsConcurrencyToken()
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("Code")
.IsUnique();
b.HasIndex("TriggerType", "Enabled", "Priority");
b.ToTable("wms_transport_rules", (string)null);
});
modelBuilder.Entity("MiGu.DB.Domains.Transport.WmsTransportTask", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property<string>("BusinessType")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property<string>("ContainerId")
.IsRequired()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property<string>("CreatedAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property<string>("CreatedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<string>("DeletedAt")
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property<string>("DeletedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<string>("DeliveryId")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property<string>("DispatchMissionId")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property<string>("DispatchStatus")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("TEXT");
b.Property<string>("ErrorMessage")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("TEXT");
b.Property<string>("Extend")
.IsRequired()
.HasColumnType("text");
b.Property<bool>("IsDeleted")
.HasColumnType("INTEGER");
b.Property<bool>("IsLock")
.HasColumnType("INTEGER")
.HasColumnName("IsLock");
b.Property<string>("MaterialId")
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property<decimal?>("Quantity")
.HasPrecision(18, 4)
.HasColumnType("TEXT");
b.Property<string>("Reason")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("TEXT");
b.Property<string>("Remark")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("TEXT");
b.Property<string>("RuleId")
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property<string>("SnapshotJson")
.IsRequired()
.HasColumnType("text");
b.Property<string>("SourceStorageId")
.IsRequired()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property<string>("Status")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("TEXT");
b.Property<string>("TargetStorageId")
.IsRequired()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property<int>("TaskPriority")
.HasColumnType("INTEGER");
b.Property<string>("UpdatedAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property<string>("UpdatedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<long>("Version")
.IsConcurrencyToken()
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("ContainerId");
b.HasIndex("Status");
b.HasIndex("TargetStorageId");
b.ToTable("wms_transport_tasks", (string)null);
});
modelBuilder.Entity("MiGu.DB.Domains.Transport.WmsTransportTaskHistory", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property<string>("ErrorMessage")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("TEXT");
b.Property<string>("FromStatus")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("TEXT");
b.Property<string>("OperatedAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property<string>("Operator")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<string>("Reason")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("TEXT");
b.Property<string>("SnapshotJson")
.IsRequired()
.HasColumnType("text");
b.Property<string>("TaskId")
.IsRequired()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property<string>("ToStatus")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("OperatedAt");
b.HasIndex("TaskId");
b.ToTable("wms_transport_task_history", (string)null);
});
modelBuilder.Entity("MiGu.DB.Domains.Wms.Container", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property<string>("AreaId")
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property<string>("Barcode")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<string>("Code")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property<string>("ContainerType")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property<string>("CreatedAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property<string>("CreatedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<string>("DeletedAt")
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property<string>("DeletedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<bool>("Enabled")
.HasColumnType("INTEGER");
b.Property<string>("Extend")
.IsRequired()
.HasColumnType("text");
b.Property<double>("Height")
.HasColumnType("REAL");
b.Property<bool>("IsDeleted")
.HasColumnType("INTEGER");
b.Property<bool>("IsLock")
.HasColumnType("INTEGER")
.HasColumnName("IsLock");
b.Property<double>("Length")
.HasColumnType("REAL");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<string>("Remark")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("TEXT");
b.Property<string>("Status")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("TEXT");
b.Property<string>("UpdatedAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property<string>("UpdatedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<long>("Version")
.IsConcurrencyToken()
.HasColumnType("INTEGER");
b.Property<double>("Width")
.HasColumnType("REAL");
b.HasKey("Id");
b.HasIndex("Code")
.IsUnique();
b.ToTable("wms_containers", (string)null);
});
modelBuilder.Entity("MiGu.DB.Domains.Wms.ContainerLocation", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property<string>("ContainerId")
.IsRequired()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property<string>("CreatedAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property<string>("CreatedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<string>("DeletedAt")
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property<string>("DeletedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<string>("EnteredAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property<string>("Extend")
.IsRequired()
.HasColumnType("text");
b.Property<bool>("IsDeleted")
.HasColumnType("INTEGER");
b.Property<bool>("IsLock")
.HasColumnType("INTEGER")
.HasColumnName("IsLock");
b.Property<string>("LocationCode")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property<string>("LocationId")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property<string>("LocationName")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<string>("LocationType")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("TEXT");
b.Property<string>("Remark")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("TEXT");
b.Property<string>("Status")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("TEXT");
b.Property<string>("StorageId")
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property<string>("UpdatedAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property<string>("UpdatedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<long>("Version")
.IsConcurrencyToken()
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("ContainerId")
.IsUnique();
b.HasIndex("StorageId");
b.HasIndex("LocationType", "LocationId");
b.ToTable("wms_container_locations", (string)null);
});
modelBuilder.Entity("MiGu.DB.Domains.Wms.ContainerLocationHistory", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property<string>("AfterJson")
.IsRequired()
.HasColumnType("text");
b.Property<string>("BeforeJson")
.IsRequired()
.HasColumnType("text");
b.Property<string>("ContainerId")
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property<string>("EventType")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property<string>("Extend")
.IsRequired()
.HasColumnType("text");
b.Property<string>("FromLocationId")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property<string>("FromLocationType")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("TEXT");
b.Property<string>("OperatedAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property<string>("Operator")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<string>("Reason")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("TEXT");
b.Property<string>("RelationId")
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property<string>("Remark")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("TEXT");
b.Property<string>("Source")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("TEXT");
b.Property<string>("ToLocationId")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property<string>("ToLocationType")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("ContainerId");
b.HasIndex("EventType");
b.HasIndex("OperatedAt");
b.ToTable("wms_container_location_history", (string)null);
});
modelBuilder.Entity("MiGu.DB.Domains.Wms.ContainerMaterial", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property<string>("BatchNo")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property<string>("BoundAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property<string>("ContainerId")
.IsRequired()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property<string>("CreatedAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property<string>("CreatedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<string>("DeletedAt")
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property<string>("DeletedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<string>("Extend")
.IsRequired()
.HasColumnType("text");
b.Property<bool>("IsDeleted")
.HasColumnType("INTEGER");
b.Property<bool>("IsLock")
.HasColumnType("INTEGER")
.HasColumnName("IsLock");
b.Property<string>("LoadedAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property<string>("MaterialId")
.IsRequired()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property<decimal>("Quantity")
.HasPrecision(18, 4)
.HasColumnType("TEXT");
b.Property<string>("Remark")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("TEXT");
b.Property<string>("SerialNo")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property<string>("Status")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("TEXT");
b.Property<string>("UnloadedAt")
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property<string>("UpdatedAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property<string>("UpdatedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<long>("Version")
.IsConcurrencyToken()
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("ContainerId");
b.HasIndex("MaterialId")
.IsUnique();
b.ToTable("wms_container_materials", (string)null);
});
modelBuilder.Entity("MiGu.DB.Domains.Wms.ContainerMaterialHistory", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property<string>("AfterJson")
.IsRequired()
.HasColumnType("text");
b.Property<string>("BeforeJson")
.IsRequired()
.HasColumnType("text");
b.Property<string>("ContainerId")
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property<string>("EventType")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property<string>("Extend")
.IsRequired()
.HasColumnType("text");
b.Property<string>("MaterialId")
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property<string>("OperatedAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property<string>("Operator")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<decimal>("QuantityDelta")
.HasPrecision(18, 4)
.HasColumnType("TEXT");
b.Property<string>("Reason")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("TEXT");
b.Property<string>("RelationId")
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property<string>("Remark")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("TEXT");
b.Property<string>("Source")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("ContainerId");
b.HasIndex("EventType");
b.HasIndex("OperatedAt");
b.ToTable("wms_container_material_history", (string)null);
});
modelBuilder.Entity("MiGu.DB.Domains.Wms.Material", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property<string>("Barcode")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<string>("Category")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property<string>("Code")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property<string>("CreatedAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property<string>("CreatedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<string>("DeletedAt")
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property<string>("DeletedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<bool>("Enabled")
.HasColumnType("INTEGER");
b.Property<string>("Extend")
.IsRequired()
.HasColumnType("text");
b.Property<bool>("IsDeleted")
.HasColumnType("INTEGER");
b.Property<bool>("IsLock")
.HasColumnType("INTEGER")
.HasColumnName("IsLock");
b.Property<string>("LifecycleStatus")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("TEXT");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<string>("Remark")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("TEXT");
b.Property<string>("Spec")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<string>("TypeCode")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property<string>("UnboundAt")
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property<string>("Unit")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("TEXT");
b.Property<string>("UpdatedAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property<string>("UpdatedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<long>("Version")
.IsConcurrencyToken()
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("Barcode");
b.HasIndex("Code")
.IsUnique();
b.HasIndex("TypeCode");
b.HasIndex("LifecycleStatus", "UpdatedAt");
b.ToTable("wms_materials", (string)null);
});
modelBuilder.Entity("MiGu.DB.Domains.Wms.MaterialType", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property<string>("BarcodePrefix")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property<string>("Category")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property<string>("Code")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property<string>("CreatedAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property<string>("CreatedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<string>("DeletedAt")
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property<string>("DeletedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<bool>("Enabled")
.HasColumnType("INTEGER");
b.Property<string>("Extend")
.IsRequired()
.HasColumnType("text");
b.Property<bool>("IsDeleted")
.HasColumnType("INTEGER");
b.Property<bool>("IsLock")
.HasColumnType("INTEGER")
.HasColumnName("IsLock");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<string>("Remark")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("TEXT");
b.Property<string>("Spec")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<string>("Unit")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("TEXT");
b.Property<string>("UpdatedAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property<string>("UpdatedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<long>("Version")
.IsConcurrencyToken()
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("Code")
.IsUnique();
b.ToTable("wms_material_types", (string)null);
});
modelBuilder.Entity("MiGu.DB.Domains.Wms.StockEvent", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property<string>("AreaCode")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property<string>("ContainerCode")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property<string>("ContainerId")
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property<string>("ContainerName")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<string>("EventType")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("TEXT");
b.Property<string>("FromStorageCode")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property<string>("FromStorageId")
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property<string>("FromStorageName")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<string>("MaterialBarcode")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<string>("MaterialCode")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property<string>("MaterialId")
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property<string>("MaterialName")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<string>("MaterialTypeCode")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property<string>("OperatedAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property<string>("Operator")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<string>("Reason")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("TEXT");
b.Property<string>("RefCode")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property<string>("RefId")
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property<string>("RefType")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property<string>("StorageCode")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property<string>("StorageId")
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property<string>("StorageName")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<string>("ToStorageCode")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property<string>("ToStorageId")
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property<string>("ToStorageName")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("ContainerId");
b.HasIndex("EventType");
b.HasIndex("MaterialId");
b.HasIndex("OperatedAt");
b.ToTable("wms_stock_events", (string)null);
});
modelBuilder.Entity("MiGu.DB.Domains.Wms.Storage", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property<bool>("AllowInbound")
.HasColumnType("INTEGER");
b.Property<bool>("AllowOutbound")
.HasColumnType("INTEGER");
b.Property<string>("AreaId")
.IsRequired()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property<string>("Barcode")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<int>("Capacity")
.HasColumnType("INTEGER");
b.Property<string>("Code")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property<int>("ColumnNo")
.HasColumnType("INTEGER");
b.Property<string>("CreatedAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property<string>("CreatedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<string>("DeletedAt")
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property<string>("DeletedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<int>("DepthNo")
.HasColumnType("INTEGER");
b.Property<bool>("Enabled")
.HasColumnType("INTEGER");
b.Property<string>("Extend")
.IsRequired()
.HasColumnType("text");
b.Property<bool>("IsDeleted")
.HasColumnType("INTEGER");
b.Property<bool>("IsLock")
.HasColumnType("INTEGER")
.HasColumnName("IsLock");
b.Property<int>("LevelNo")
.HasColumnType("INTEGER");
b.Property<string>("LocationKind")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("TEXT");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<int>("Priority")
.HasColumnType("INTEGER");
b.Property<string>("Remark")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("TEXT");
b.Property<string>("SiteCode")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property<string>("SiteId")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property<string>("Status")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("TEXT");
b.Property<string>("StorageType")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property<string>("UpdatedAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property<string>("UpdatedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<string>("Usage")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property<long>("Version")
.IsConcurrencyToken()
.HasColumnType("INTEGER");
b.Property<string>("ZoneCode")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("AreaId");
b.HasIndex("Barcode");
b.HasIndex("Code")
.IsUnique();
b.ToTable("wms_storages", (string)null);
});
modelBuilder.Entity("MiGu.DB.Domains.Wms.Warehouse", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property<string>("Code")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property<string>("CreatedAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property<string>("CreatedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<string>("DeletedAt")
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property<string>("DeletedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<bool>("Enabled")
.HasColumnType("INTEGER");
b.Property<string>("Extend")
.IsRequired()
.HasColumnType("text");
b.Property<bool>("IsDeleted")
.HasColumnType("INTEGER");
b.Property<bool>("IsLock")
.HasColumnType("INTEGER")
.HasColumnName("IsLock");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<string>("Remark")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("TEXT");
b.Property<int>("SortOrder")
.HasColumnType("INTEGER");
b.Property<string>("Type")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property<string>("UpdatedAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property<string>("UpdatedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<long>("Version")
.IsConcurrencyToken()
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("Code")
.IsUnique();
b.ToTable("wms_warehouses", (string)null);
});
modelBuilder.Entity("MiGu.DB.Domains.Wms.WarehouseArea", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property<string>("Code")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property<string>("CreatedAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property<string>("CreatedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<string>("DeletedAt")
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property<string>("DeletedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<bool>("Enabled")
.HasColumnType("INTEGER");
b.Property<string>("Extend")
.IsRequired()
.HasColumnType("text");
b.Property<bool>("IsDeleted")
.HasColumnType("INTEGER");
b.Property<bool>("IsLock")
.HasColumnType("INTEGER")
.HasColumnName("IsLock");
b.Property<string>("LayoutMode")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("TEXT");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<string>("Remark")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("TEXT");
b.Property<int>("SortOrder")
.HasColumnType("INTEGER");
b.Property<string>("State")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("TEXT");
b.Property<string>("Type")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property<string>("UpdatedAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property<string>("UpdatedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<long>("Version")
.IsConcurrencyToken()
.HasColumnType("INTEGER");
b.Property<string>("WarehouseId")
.IsRequired()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("Code")
.IsUnique();
b.HasIndex("WarehouseId");
b.ToTable("wms_areas", (string)null);
});
#pragma warning restore 612, 618
}
}
}