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:
@@ -26,6 +26,7 @@ import (
|
||||
"bj_power_wms/ent/semifinished"
|
||||
"bj_power_wms/ent/stocktakeitem"
|
||||
"bj_power_wms/ent/stocktakeorder"
|
||||
"bj_power_wms/ent/syncfailure"
|
||||
"bj_power_wms/ent/sysconfig"
|
||||
"bj_power_wms/ent/user"
|
||||
"bj_power_wms/ent/zone"
|
||||
@@ -825,6 +826,56 @@ func init() {
|
||||
stocktakeorderDescCreatedAt := stocktakeorderFields[11].Descriptor()
|
||||
// stocktakeorder.DefaultCreatedAt holds the default value on creation for the created_at field.
|
||||
stocktakeorder.DefaultCreatedAt = stocktakeorderDescCreatedAt.Default.(func() int64)
|
||||
syncfailureFields := schema.SyncFailure{}.Fields()
|
||||
_ = syncfailureFields
|
||||
// syncfailureDescDirection is the schema descriptor for direction field.
|
||||
syncfailureDescDirection := syncfailureFields[1].Descriptor()
|
||||
// syncfailure.DefaultDirection holds the default value on creation for the direction field.
|
||||
syncfailure.DefaultDirection = syncfailureDescDirection.Default.(string)
|
||||
// syncfailureDescBizType is the schema descriptor for biz_type field.
|
||||
syncfailureDescBizType := syncfailureFields[2].Descriptor()
|
||||
// syncfailure.DefaultBizType holds the default value on creation for the biz_type field.
|
||||
syncfailure.DefaultBizType = syncfailureDescBizType.Default.(string)
|
||||
// syncfailureDescBizKey is the schema descriptor for biz_key field.
|
||||
syncfailureDescBizKey := syncfailureFields[3].Descriptor()
|
||||
// syncfailure.DefaultBizKey holds the default value on creation for the biz_key field.
|
||||
syncfailure.DefaultBizKey = syncfailureDescBizKey.Default.(string)
|
||||
// syncfailureDescEndpoint is the schema descriptor for endpoint field.
|
||||
syncfailureDescEndpoint := syncfailureFields[4].Descriptor()
|
||||
// syncfailure.DefaultEndpoint holds the default value on creation for the endpoint field.
|
||||
syncfailure.DefaultEndpoint = syncfailureDescEndpoint.Default.(string)
|
||||
// syncfailureDescPayloadJSON is the schema descriptor for payload_json field.
|
||||
syncfailureDescPayloadJSON := syncfailureFields[5].Descriptor()
|
||||
// syncfailure.DefaultPayloadJSON holds the default value on creation for the payload_json field.
|
||||
syncfailure.DefaultPayloadJSON = syncfailureDescPayloadJSON.Default.(string)
|
||||
// syncfailureDescErrorMsg is the schema descriptor for error_msg field.
|
||||
syncfailureDescErrorMsg := syncfailureFields[6].Descriptor()
|
||||
// syncfailure.DefaultErrorMsg holds the default value on creation for the error_msg field.
|
||||
syncfailure.DefaultErrorMsg = syncfailureDescErrorMsg.Default.(string)
|
||||
// syncfailureDescStatus is the schema descriptor for status field.
|
||||
syncfailureDescStatus := syncfailureFields[8].Descriptor()
|
||||
// syncfailure.DefaultStatus holds the default value on creation for the status field.
|
||||
syncfailure.DefaultStatus = syncfailureDescStatus.Default.(string)
|
||||
// syncfailureDescRetryCount is the schema descriptor for retry_count field.
|
||||
syncfailureDescRetryCount := syncfailureFields[9].Descriptor()
|
||||
// syncfailure.DefaultRetryCount holds the default value on creation for the retry_count field.
|
||||
syncfailure.DefaultRetryCount = syncfailureDescRetryCount.Default.(int32)
|
||||
// syncfailureDescCreatedAt is the schema descriptor for created_at field.
|
||||
syncfailureDescCreatedAt := syncfailureFields[10].Descriptor()
|
||||
// syncfailure.DefaultCreatedAt holds the default value on creation for the created_at field.
|
||||
syncfailure.DefaultCreatedAt = syncfailureDescCreatedAt.Default.(int64)
|
||||
// syncfailureDescLastErrorAt is the schema descriptor for last_error_at field.
|
||||
syncfailureDescLastErrorAt := syncfailureFields[11].Descriptor()
|
||||
// syncfailure.DefaultLastErrorAt holds the default value on creation for the last_error_at field.
|
||||
syncfailure.DefaultLastErrorAt = syncfailureDescLastErrorAt.Default.(int64)
|
||||
// syncfailureDescHandledBy is the schema descriptor for handled_by field.
|
||||
syncfailureDescHandledBy := syncfailureFields[12].Descriptor()
|
||||
// syncfailure.DefaultHandledBy holds the default value on creation for the handled_by field.
|
||||
syncfailure.DefaultHandledBy = syncfailureDescHandledBy.Default.(string)
|
||||
// syncfailureDescID is the schema descriptor for id field.
|
||||
syncfailureDescID := syncfailureFields[0].Descriptor()
|
||||
// syncfailure.IDValidator is a validator for the "id" field. It is called by the builders before save.
|
||||
syncfailure.IDValidator = syncfailureDescID.Validators[0].(func(int) error)
|
||||
sysconfigFields := schema.SysConfig{}.Fields()
|
||||
_ = sysconfigFields
|
||||
// sysconfigDescKey is the schema descriptor for key field.
|
||||
|
||||
Reference in New Issue
Block a user