Files
bj_power/bj_power_wms/ent/eventlog/eventlog.go
T
SunYF b6799c9de4 feat: 完成产线与仓储系统多模块迭代升级
本次迭代覆盖MES与WMS核心业务:
1. 新增接驳台托盘传感器读取与AGV对接能力
2. 完善工单排产、备料流程与权限体系拆分
3. 优化看板接口与前端路由、样式
4. 新增操作日志、库存盘点与角色保护逻辑
5. 修复代理地址、BOM保存等已知问题
2026-09-04 14:18:53 +08:00

112 lines
4.0 KiB
Go

// Code generated by ent, DO NOT EDIT.
package eventlog
import (
"entgo.io/ent/dialect/sql"
)
const (
// Label holds the string label denoting the eventlog type in the database.
Label = "event_log"
// FieldID holds the string denoting the id field in the database.
FieldID = "id"
// FieldEventType holds the string denoting the event_type field in the database.
FieldEventType = "event_type"
// FieldOperator holds the string denoting the operator field in the database.
FieldOperator = "operator"
// FieldEntityType holds the string denoting the entity_type field in the database.
FieldEntityType = "entity_type"
// FieldEntityID holds the string denoting the entity_id field in the database.
FieldEntityID = "entity_id"
// FieldDescription holds the string denoting the description field in the database.
FieldDescription = "description"
// FieldPayload holds the string denoting the payload field in the database.
FieldPayload = "payload"
// FieldCreatedAt holds the string denoting the created_at field in the database.
FieldCreatedAt = "created_at"
// Table holds the table name of the eventlog in the database.
Table = "event_log"
)
// Columns holds all SQL columns for eventlog fields.
var Columns = []string{
FieldID,
FieldEventType,
FieldOperator,
FieldEntityType,
FieldEntityID,
FieldDescription,
FieldPayload,
FieldCreatedAt,
}
// 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 (
// EventTypeValidator is a validator for the "event_type" field. It is called by the builders before save.
EventTypeValidator func(string) error
// DefaultOperator holds the default value on creation for the "operator" field.
DefaultOperator string
// OperatorValidator is a validator for the "operator" field. It is called by the builders before save.
OperatorValidator func(string) error
// DefaultEntityType holds the default value on creation for the "entity_type" field.
DefaultEntityType string
// EntityTypeValidator is a validator for the "entity_type" field. It is called by the builders before save.
EntityTypeValidator func(string) error
// DefaultEntityID holds the default value on creation for the "entity_id" field.
DefaultEntityID string
// EntityIDValidator is a validator for the "entity_id" field. It is called by the builders before save.
EntityIDValidator func(string) error
// DefaultDescription holds the default value on creation for the "description" field.
DefaultDescription string
// DefaultCreatedAt holds the default value on creation for the "created_at" field.
DefaultCreatedAt func() int64
)
// OrderOption defines the ordering options for the EventLog 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()
}
// ByEventType orders the results by the event_type field.
func ByEventType(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldEventType, opts...).ToFunc()
}
// ByOperator orders the results by the operator field.
func ByOperator(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldOperator, opts...).ToFunc()
}
// ByEntityType orders the results by the entity_type field.
func ByEntityType(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldEntityType, opts...).ToFunc()
}
// ByEntityID orders the results by the entity_id field.
func ByEntityID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldEntityID, opts...).ToFunc()
}
// ByDescription orders the results by the description field.
func ByDescription(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldDescription, opts...).ToFunc()
}
// ByCreatedAt orders the results by the created_at field.
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
}