//
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("20260727011546_InitialPlatform")]
partial class InitialPlatform
{
///
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.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("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("Code")
.IsUnique();
b.ToTable("wms_material_types", (string)null);
});
modelBuilder.Entity("MiGu.DB.Domains.Wms.StockEvent", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property("AreaCode")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property("ContainerCode")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property("ContainerId")
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property("ContainerName")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("EventType")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("TEXT");
b.Property("FromStorageCode")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property("FromStorageId")
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property("FromStorageName")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("MaterialBarcode")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("MaterialCode")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property("MaterialId")
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property("MaterialName")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("MaterialTypeCode")
.IsRequired()
.HasMaxLength(64)
.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("RefCode")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property("RefId")
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property("RefType")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property("StorageCode")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property("StorageId")
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property("StorageName")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("ToStorageCode")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property("ToStorageId")
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property("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("Id")
.ValueGeneratedOnAdd()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property("AllowInbound")
.HasColumnType("INTEGER");
b.Property("AllowOutbound")
.HasColumnType("INTEGER");
b.Property("AreaId")
.IsRequired()
.HasMaxLength(36)
.HasColumnType("TEXT");
b.Property