移除历史状态归一化及相关遗留逻辑
- 移除 LegacyStatusNormalizationMigrator,仅保留 AreaLayoutModeDefaultMigrator - 删除 WmsDispatchStatus 枚举、常量和全局 using - 统一所有 DbContext 注入为 MiGuDbContext,移除 PlatformDbContext - 服务实体操作统一用 IEditableRepository<T>,移除本地实现 - 移除 WmsService 的 MigrateLegacyAsync 方法 - 精简接口模型,移除部分字段和请求体 - 前端保存容器时 status 字段取自已有数据,移除写死默认值 - 更新文档,去除旧说明,统一数据库初始化流程
This commit is contained in:
+1
-2
@@ -17,7 +17,7 @@
|
||||
|
||||
```csharp
|
||||
builder.Services.AddPlatformPersistence(builder.Configuration); // 内部 AddMiGuDb
|
||||
await app.Services.EnsurePlatformDatabaseAsync(); // 内部 MigrateMiGuDbAsync
|
||||
await app.Services.MigrateMiGuDbAsync();
|
||||
```
|
||||
|
||||
**启动流程、SchemaMode、开发/发版配置说明见 [MiGu.Server/README.md · 数据库启动流程](../MiGu.Server/README.md#数据库启动流程)。**
|
||||
@@ -27,7 +27,6 @@ await app.Services.EnsurePlatformDatabaseAsync(); // 内部 Migrat
|
||||
## 实体与枚举
|
||||
|
||||
- 业务状态字段为 **enum**,约定自动 `HasConversion<string>()`(严格 1:1,不做读侧归一)。
|
||||
- 旧库值(如 `Available`/`Idle`)由 `LegacyStatusNormalizationMigrator` 一次性刷成规范名。
|
||||
- `Version` 为乐观并发令牌;软删走全局 `HasQueryFilter`。
|
||||
- 复数辅助类(`StorageStatuses`、`LocationKinds`…)负责 API 字符串解析与集合校验。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user