Files
Migu2.0/MiGu.DB/Migrations/Sqlite/MiGuDbContextModelSnapshot.cs
T
wei.wu 51c3fc1994 持久层重构为独立 MiGu.DB 工程并优化集成
- 新增 MiGu.DB 项目,迁移所有领域实体与枚举,统一模型约定
- 实现 Entity/Repository/UoW/Provider/Exception 等接口与实现
- 支持数据修补机制,完善 Sqlite 初始迁移与数据库管理
- Server 侧移除 EF Core 相关,依赖 MiGu.DB,PlatformPersistence 适配
- 业务服务注入 UoW/Repository,状态字段统一用 enum 及辅助类
- 统一异常处理,Controller 映射 HTTP 状态码
- 配置项与文档补充数据库启动、SchemaMode、迁移说明
- 新增 GlobalUsings.Db.cs、WmsStatusAliases.cs 简化类型引用
- 新增 HttpActorContextMiddleware 支持操作者上下文一致性
- 新增 MiGuDbContextModelSnapshot 追踪数据库结构
- 优化代码结构,解耦领域与持久层,提升扩展性与安全性
2026-07-27 14:26:04 +08:00

1684 lines
58 KiB
C#

// <auto-generated />
using System;
using MiGu.DB.Kernel.Context;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace MiGu.DB.Migrations.Sqlite
{
[DbContext(typeof(MiGuDbContext))]
partial class MiGuDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(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.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
}
}
}