feat: 同步失败(SyncFailure)实体化与 ent 全量重生成
- 新增 SyncFailure 实体:MES/WMS 两端 schema 源 + ent 生成码(create/delete/query/update 及子包) - ent 框架文件全量重生成:client/ent/hook/migrate/mutation/predicate/runtime/tx - 清理旧代码生成入口:删除 schema/gen.go 与 schema/tools/generate.go - 同步失败页面调整:MES/WMS SyncFailure.vue 接入新实体,MES 产品工艺页同步调整 - 主程序入口注册新实体:bj_power_mes.go / bj_power_wms.go,工作站 main.go 同步调整 - 更新文档:WMS README、案例、问题记录;刷新 MES/WMS 前端构建产物
This commit is contained in:
@@ -42,7 +42,7 @@
|
||||
## 代码分层
|
||||
|
||||
- **handler 保持薄层**,业务逻辑写在 logic 层,不在 handler 里写业务。
|
||||
- **不手动修改生成代码**:`ent/`、`internal/handler/`、`internal/types/` 为 goctl/ent 自动生成。改 schema 走 `cd schema && go generate`,改 api 走 `cd apis && go generate`。
|
||||
- **不手动修改生成代码**:`ent/`、`internal/handler/`、`internal/types/` 为 goctl/ent 自动生成。改 schema 走 `cd bj_power_mes && go run ./tools/generate.go`(WMS:`cd bj_power_wms && go run -tags entgenerate ./tools/generate.go`),改 api 走 `cd apis && go generate`。
|
||||
- 简单优先:用最少代码解决问题;不为单次使用创建抽象;不写不可能出现的错误处理。
|
||||
- 精准改动:只改必须改的部分,不改没坏的东西,风格匹配现有代码。
|
||||
- **不 mock 冒充真连**:硬件联调分层 L1→L2→L3,L2 不过不许进 L3。
|
||||
|
||||
Reference in New Issue
Block a user