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:
@@ -0,0 +1,162 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package syncfailure
|
||||
|
||||
import (
|
||||
"entgo.io/ent/dialect/sql"
|
||||
)
|
||||
|
||||
const (
|
||||
// Label holds the string label denoting the syncfailure type in the database.
|
||||
Label = "sync_failure"
|
||||
// FieldID holds the string denoting the id field in the database.
|
||||
FieldID = "id"
|
||||
// FieldDirection holds the string denoting the direction field in the database.
|
||||
FieldDirection = "direction"
|
||||
// FieldBizType holds the string denoting the biz_type field in the database.
|
||||
FieldBizType = "biz_type"
|
||||
// FieldBizKey holds the string denoting the biz_key field in the database.
|
||||
FieldBizKey = "biz_key"
|
||||
// FieldEndpoint holds the string denoting the endpoint field in the database.
|
||||
FieldEndpoint = "endpoint"
|
||||
// FieldPayloadJSON holds the string denoting the payload_json field in the database.
|
||||
FieldPayloadJSON = "payload_json"
|
||||
// FieldErrorMsg holds the string denoting the error_msg field in the database.
|
||||
FieldErrorMsg = "error_msg"
|
||||
// FieldIdempotencyKey holds the string denoting the idempotency_key field in the database.
|
||||
FieldIdempotencyKey = "idempotency_key"
|
||||
// FieldStatus holds the string denoting the status field in the database.
|
||||
FieldStatus = "status"
|
||||
// FieldRetryCount holds the string denoting the retry_count field in the database.
|
||||
FieldRetryCount = "retry_count"
|
||||
// FieldCreatedAt holds the string denoting the created_at field in the database.
|
||||
FieldCreatedAt = "created_at"
|
||||
// FieldLastErrorAt holds the string denoting the last_error_at field in the database.
|
||||
FieldLastErrorAt = "last_error_at"
|
||||
// FieldHandledBy holds the string denoting the handled_by field in the database.
|
||||
FieldHandledBy = "handled_by"
|
||||
// Table holds the table name of the syncfailure in the database.
|
||||
Table = "sync_failure"
|
||||
)
|
||||
|
||||
// Columns holds all SQL columns for syncfailure fields.
|
||||
var Columns = []string{
|
||||
FieldID,
|
||||
FieldDirection,
|
||||
FieldBizType,
|
||||
FieldBizKey,
|
||||
FieldEndpoint,
|
||||
FieldPayloadJSON,
|
||||
FieldErrorMsg,
|
||||
FieldIdempotencyKey,
|
||||
FieldStatus,
|
||||
FieldRetryCount,
|
||||
FieldCreatedAt,
|
||||
FieldLastErrorAt,
|
||||
FieldHandledBy,
|
||||
}
|
||||
|
||||
// ValidColumn reports if the column name is valid (part of the table columns).
|
||||
func ValidColumn(column string) bool {
|
||||
for i := range Columns {
|
||||
if column == Columns[i] {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
var (
|
||||
// DefaultDirection holds the default value on creation for the "direction" field.
|
||||
DefaultDirection string
|
||||
// DefaultBizType holds the default value on creation for the "biz_type" field.
|
||||
DefaultBizType string
|
||||
// DefaultBizKey holds the default value on creation for the "biz_key" field.
|
||||
DefaultBizKey string
|
||||
// DefaultEndpoint holds the default value on creation for the "endpoint" field.
|
||||
DefaultEndpoint string
|
||||
// DefaultPayloadJSON holds the default value on creation for the "payload_json" field.
|
||||
DefaultPayloadJSON string
|
||||
// DefaultErrorMsg holds the default value on creation for the "error_msg" field.
|
||||
DefaultErrorMsg string
|
||||
// DefaultStatus holds the default value on creation for the "status" field.
|
||||
DefaultStatus string
|
||||
// DefaultRetryCount holds the default value on creation for the "retry_count" field.
|
||||
DefaultRetryCount int32
|
||||
// DefaultCreatedAt holds the default value on creation for the "created_at" field.
|
||||
DefaultCreatedAt int64
|
||||
// DefaultLastErrorAt holds the default value on creation for the "last_error_at" field.
|
||||
DefaultLastErrorAt int64
|
||||
// DefaultHandledBy holds the default value on creation for the "handled_by" field.
|
||||
DefaultHandledBy string
|
||||
// IDValidator is a validator for the "id" field. It is called by the builders before save.
|
||||
IDValidator func(int) error
|
||||
)
|
||||
|
||||
// OrderOption defines the ordering options for the SyncFailure queries.
|
||||
type OrderOption func(*sql.Selector)
|
||||
|
||||
// ByID orders the results by the id field.
|
||||
func ByID(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldID, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByDirection orders the results by the direction field.
|
||||
func ByDirection(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldDirection, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByBizType orders the results by the biz_type field.
|
||||
func ByBizType(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldBizType, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByBizKey orders the results by the biz_key field.
|
||||
func ByBizKey(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldBizKey, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByEndpoint orders the results by the endpoint field.
|
||||
func ByEndpoint(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldEndpoint, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByPayloadJSON orders the results by the payload_json field.
|
||||
func ByPayloadJSON(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldPayloadJSON, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByErrorMsg orders the results by the error_msg field.
|
||||
func ByErrorMsg(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldErrorMsg, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByIdempotencyKey orders the results by the idempotency_key field.
|
||||
func ByIdempotencyKey(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldIdempotencyKey, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByStatus orders the results by the status field.
|
||||
func ByStatus(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldStatus, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByRetryCount orders the results by the retry_count field.
|
||||
func ByRetryCount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldRetryCount, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCreatedAt orders the results by the created_at field.
|
||||
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByLastErrorAt orders the results by the last_error_at field.
|
||||
func ByLastErrorAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldLastErrorAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByHandledBy orders the results by the handled_by field.
|
||||
func ByHandledBy(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldHandledBy, opts...).ToFunc()
|
||||
}
|
||||
Reference in New Issue
Block a user