//
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
{
///
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("UserId")
.HasMaxLength(64)
.HasColumnType("TEXT")
.HasColumnName("user_id");
b.Property("Scope")
.HasMaxLength(32)
.HasColumnType("TEXT")
.HasColumnName("scope");
b.Property("KeysJson")
.IsRequired()
.HasColumnType("text")
.HasColumnName("keys_json");
b.Property("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("Id")
.HasMaxLength(64)
.HasColumnType("TEXT")
.HasColumnName("id");
b.Property("CarId")
.HasColumnType("INTEGER")
.HasColumnName("car_id");
b.Property("CarName")
.HasMaxLength(128)
.HasColumnType("TEXT")
.HasColumnName("car_name");
b.Property("CreateTime")
.HasMaxLength(40)
.HasColumnType("TEXT")
.HasColumnName("create_time");
b.Property("DstLabel")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("TEXT")
.HasColumnName("dst_label");
b.Property("DstSiteId")
.HasColumnType("INTEGER")
.HasColumnName("dst_site_id");
b.Property("FinishTime")
.HasMaxLength(40)
.HasColumnType("TEXT")
.HasColumnName("finish_time");
b.Property("FirstSeenAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT")
.HasColumnName("first_seen_at");
b.Property("LastSeenAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT")
.HasColumnName("last_seen_at");
b.Property("MissionId")
.HasColumnType("INTEGER")
.HasColumnName("mission_id");
b.Property("MissionName")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT")
.HasColumnName("mission_name");
b.Property("MissionTypeName")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT")
.HasColumnName("mission_type");
b.Property("Overdue")
.HasColumnType("INTEGER")
.HasColumnName("overdue");
b.Property("Priority")
.HasColumnType("INTEGER")
.HasColumnName("priority");
b.Property("SrcLabel")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("TEXT")
.HasColumnName("src_label");
b.Property("SrcSiteId")
.HasColumnType("INTEGER")
.HasColumnName("src_site_id");
b.Property("StartTime")
.HasMaxLength(40)
.HasColumnType("TEXT")
.HasColumnName("start_time");
b.Property("Status")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("TEXT")
.HasColumnName("status");
b.Property("StatusCode")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("TEXT")
.HasColumnName("status_code");
b.Property("StuckReason")
.HasMaxLength(512)
.HasColumnType("TEXT")
.HasColumnName("stuck_reason");
b.Property("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("Id")
.HasMaxLength(36)
.HasColumnType("TEXT")
.HasColumnName("id");
b.Property("Acknowledged")
.HasColumnType("INTEGER")
.HasColumnName("acknowledged");
b.Property("AcknowledgedAt")
.HasMaxLength(40)
.HasColumnType("TEXT")
.HasColumnName("acknowledged_at");
b.Property("AcknowledgedBy")
.HasMaxLength(128)
.HasColumnType("TEXT")
.HasColumnName("acknowledged_by");
b.Property("CarId")
.HasColumnType("INTEGER")
.HasColumnName("car_id");
b.Property("CarName")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT")
.HasColumnName("car_name");
b.Property("DurationSecs")
.HasColumnType("INTEGER")
.HasColumnName("duration_secs");
b.Property("FirstAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT")
.HasColumnName("first_at");
b.Property("Info")
.IsRequired()
.HasColumnType("text")
.HasColumnName("info");
b.Property("LastAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT")
.HasColumnName("last_at");
b.Property("Level")
.HasColumnType("INTEGER")
.HasColumnName("level");
b.Property("ResolvedAt")
.HasMaxLength(40)
.HasColumnType("TEXT")
.HasColumnName("resolved_at");
b.Property("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("Id")
.ValueGeneratedOnAdd()
.HasMaxLength(36)
.HasColumnType("TEXT")
.HasColumnName("id");
b.Property("CarType")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT")
.HasColumnName("car_type");
b.Property("Chinese")
.HasMaxLength(256)
.HasColumnType("TEXT")
.HasColumnName("chinese");
b.Property("CreateTime")
.IsRequired()
.HasMaxLength(19)
.HasColumnType("TEXT")
.HasColumnName("create_time");
b.Property("DataType")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT")
.HasColumnName("data_type");
b.Property("English")
.HasMaxLength(256)
.HasColumnType("TEXT")
.HasColumnName("english");
b.Property("FieldType")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT")
.HasColumnName("field_type");
b.Property("IsDefault")
.HasColumnType("INTEGER")
.HasColumnName("is_default");
b.Property("Key")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT")
.HasColumnName("key");
b.Property("Other")
.IsRequired()
.HasMaxLength(512)
.HasColumnType("TEXT")
.HasColumnName("other");
b.Property("UpdateTime")
.IsRequired()
.HasMaxLength(19)
.HasColumnType("TEXT")
.HasColumnName("update_time");
b.Property("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("Id")
.ValueGeneratedOnAdd()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property("ContainerId")
.IsRequired()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property("CreatedAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property("CreatedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("DeletedAt")
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property("DeletedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("ExpiresAt")
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property("Extend")
.IsRequired()
.HasColumnType("text");
b.Property("IsDeleted")
.HasColumnType("INTEGER");
b.Property("IsLock")
.HasColumnType("INTEGER")
.HasColumnName("IsLock");
b.Property("Remark")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("TEXT");
b.Property("SourceStorageId")
.IsRequired()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property("Status")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("TEXT");
b.Property("TargetStorageId")
.IsRequired()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property("TaskId")
.IsRequired()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property("UpdatedAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property("UpdatedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("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("Id")
.ValueGeneratedOnAdd()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property("Code")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property("CreatedAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property("CreatedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("DeletedAt")
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property("DeletedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("Enabled")
.HasColumnType("INTEGER");
b.Property("Extend")
.IsRequired()
.HasColumnType("text");
b.Property("IsDeleted")
.HasColumnType("INTEGER");
b.Property("IsLock")
.HasColumnType("INTEGER")
.HasColumnName("IsLock");
b.Property("Name")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("Priority")
.HasColumnType("INTEGER");
b.Property("Remark")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("TEXT");
b.Property("SourceSelectorJson")
.IsRequired()
.HasColumnType("text");
b.Property("TargetSelectorJson")
.IsRequired()
.HasColumnType("text");
b.Property("TaskOptionsJson")
.IsRequired()
.HasColumnType("text");
b.Property("TriggerType")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("TEXT");
b.Property("UpdatedAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property("UpdatedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("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("Id")
.ValueGeneratedOnAdd()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property("BusinessType")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property("ContainerId")
.IsRequired()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property("CreatedAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property("CreatedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("DeletedAt")
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property("DeletedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("DeliveryId")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property("DispatchMissionId")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property("DispatchStatus")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("TEXT");
b.Property("ErrorMessage")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("TEXT");
b.Property("Extend")
.IsRequired()
.HasColumnType("text");
b.Property("IsDeleted")
.HasColumnType("INTEGER");
b.Property("IsLock")
.HasColumnType("INTEGER")
.HasColumnName("IsLock");
b.Property("MaterialId")
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property("Quantity")
.HasPrecision(18, 4)
.HasColumnType("TEXT");
b.Property("Reason")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("TEXT");
b.Property("Remark")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("TEXT");
b.Property("RuleId")
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property("SnapshotJson")
.IsRequired()
.HasColumnType("text");
b.Property("SourceStorageId")
.IsRequired()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property("Status")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("TEXT");
b.Property("TargetStorageId")
.IsRequired()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property("TaskPriority")
.HasColumnType("INTEGER");
b.Property("UpdatedAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property("UpdatedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("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("Id")
.ValueGeneratedOnAdd()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property("ErrorMessage")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("TEXT");
b.Property("FromStatus")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("TEXT");
b.Property("OperatedAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property("Operator")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("Reason")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("TEXT");
b.Property("SnapshotJson")
.IsRequired()
.HasColumnType("text");
b.Property("TaskId")
.IsRequired()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property("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("Id")
.ValueGeneratedOnAdd()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property("AreaId")
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property("Barcode")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("Code")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property("ContainerType")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property("CreatedAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property("CreatedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("DeletedAt")
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property("DeletedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("Enabled")
.HasColumnType("INTEGER");
b.Property("Extend")
.IsRequired()
.HasColumnType("text");
b.Property("Height")
.HasColumnType("REAL");
b.Property("IsDeleted")
.HasColumnType("INTEGER");
b.Property("IsLock")
.HasColumnType("INTEGER")
.HasColumnName("IsLock");
b.Property("Length")
.HasColumnType("REAL");
b.Property("Name")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("Remark")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("TEXT");
b.Property("Status")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("TEXT");
b.Property("UpdatedAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property("UpdatedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("Version")
.IsConcurrencyToken()
.HasColumnType("INTEGER");
b.Property("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("Id")
.ValueGeneratedOnAdd()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property("ContainerId")
.IsRequired()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property("CreatedAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property("CreatedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("DeletedAt")
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property("DeletedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("EnteredAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property("Extend")
.IsRequired()
.HasColumnType("text");
b.Property("IsDeleted")
.HasColumnType("INTEGER");
b.Property("IsLock")
.HasColumnType("INTEGER")
.HasColumnName("IsLock");
b.Property("LocationCode")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property("LocationId")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property("LocationName")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("LocationType")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("TEXT");
b.Property("Remark")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("TEXT");
b.Property("Status")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("TEXT");
b.Property("StorageId")
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property("UpdatedAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property("UpdatedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("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("Id")
.ValueGeneratedOnAdd()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property("AfterJson")
.IsRequired()
.HasColumnType("text");
b.Property("BeforeJson")
.IsRequired()
.HasColumnType("text");
b.Property("ContainerId")
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property("EventType")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property("Extend")
.IsRequired()
.HasColumnType("text");
b.Property("FromLocationId")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property("FromLocationType")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("TEXT");
b.Property("OperatedAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property("Operator")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("Reason")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("TEXT");
b.Property("RelationId")
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property("Remark")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("TEXT");
b.Property("Source")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("TEXT");
b.Property("ToLocationId")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property("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("Id")
.ValueGeneratedOnAdd()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property("BatchNo")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property("BoundAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property("ContainerId")
.IsRequired()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property("CreatedAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property("CreatedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("DeletedAt")
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property("DeletedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("Extend")
.IsRequired()
.HasColumnType("text");
b.Property("IsDeleted")
.HasColumnType("INTEGER");
b.Property("IsLock")
.HasColumnType("INTEGER")
.HasColumnName("IsLock");
b.Property("LoadedAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property("MaterialId")
.IsRequired()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property("Quantity")
.HasPrecision(18, 4)
.HasColumnType("TEXT");
b.Property("Remark")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("TEXT");
b.Property("SerialNo")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property("Status")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("TEXT");
b.Property("UnloadedAt")
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property("UpdatedAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property("UpdatedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("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("Id")
.ValueGeneratedOnAdd()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property("AfterJson")
.IsRequired()
.HasColumnType("text");
b.Property("BeforeJson")
.IsRequired()
.HasColumnType("text");
b.Property("ContainerId")
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property("EventType")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property("Extend")
.IsRequired()
.HasColumnType("text");
b.Property("MaterialId")
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property("OperatedAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property("Operator")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("QuantityDelta")
.HasPrecision(18, 4)
.HasColumnType("TEXT");
b.Property("Reason")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("TEXT");
b.Property("RelationId")
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property("Remark")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("TEXT");
b.Property("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("Id")
.ValueGeneratedOnAdd()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property("Barcode")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("Category")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property("Code")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property("CreatedAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property("CreatedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("DeletedAt")
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property("DeletedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("Enabled")
.HasColumnType("INTEGER");
b.Property("Extend")
.IsRequired()
.HasColumnType("text");
b.Property("IsDeleted")
.HasColumnType("INTEGER");
b.Property("IsLock")
.HasColumnType("INTEGER")
.HasColumnName("IsLock");
b.Property("LifecycleStatus")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("TEXT");
b.Property("Name")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("Remark")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("TEXT");
b.Property("Spec")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("TypeCode")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property("UnboundAt")
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property("Unit")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("TEXT");
b.Property("UpdatedAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property("UpdatedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("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("Id")
.ValueGeneratedOnAdd()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property("BarcodePrefix")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property("Category")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property("Code")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property("CreatedAt")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property("CreatedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("DeletedAt")
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property("DeletedBy")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("Enabled")
.HasColumnType("INTEGER");
b.Property("Extend")
.IsRequired()
.HasColumnType("text");
b.Property("IsDeleted")
.HasColumnType("INTEGER");
b.Property("IsLock")
.HasColumnType("INTEGER")
.HasColumnName("IsLock");
b.Property("Name")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("Remark")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("TEXT");
b.Property("Spec")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property