Files
bj_power/bj_power_mes/ent/torqueauditlog/torqueauditlog.go
T
SunYF 5c3b747a20 feat: 新增预警与附件模块,优化工位派工功能
1. 新增预警规则、预警消息、业务附件数据库表与CRUD逻辑
2. 为拧紧记录添加审核人、审核时间字段及审核留痕功能
3. 优化产线点位类型与编号描述,更新工位组合下发菜单名称为工艺路线派工
4. 新增上传文件获取原文件名与大小的工具方法
5. 在系统管理菜单新增预警中心与附件中心入口
2026-09-14 16:31:08 +08:00

133 lines
4.8 KiB
Go

// Code generated by ent, DO NOT EDIT.
package torqueauditlog
import (
"time"
"entgo.io/ent/dialect/sql"
)
const (
// Label holds the string label denoting the torqueauditlog type in the database.
Label = "torque_audit_log"
// FieldID holds the string denoting the id field in the database.
FieldID = "id"
// FieldTorqueRecordId holds the string denoting the torquerecordid field in the database.
FieldTorqueRecordId = "torque_record_id"
// FieldAction holds the string denoting the action field in the database.
FieldAction = "action"
// FieldFieldName holds the string denoting the fieldname field in the database.
FieldFieldName = "field_name"
// FieldOldVal holds the string denoting the oldval field in the database.
FieldOldVal = "old_val"
// FieldNewVal holds the string denoting the newval field in the database.
FieldNewVal = "new_val"
// FieldOperator holds the string denoting the operator field in the database.
FieldOperator = "operator"
// FieldRemark holds the string denoting the remark field in the database.
FieldRemark = "remark"
// FieldCreatedAt holds the string denoting the createdat field in the database.
FieldCreatedAt = "created_at"
// Table holds the table name of the torqueauditlog in the database.
Table = "torque_audit_log"
)
// Columns holds all SQL columns for torqueauditlog fields.
var Columns = []string{
FieldID,
FieldTorqueRecordId,
FieldAction,
FieldFieldName,
FieldOldVal,
FieldNewVal,
FieldOperator,
FieldRemark,
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 (
// ActionValidator is a validator for the "action" field. It is called by the builders before save.
ActionValidator func(string) error
// DefaultFieldName holds the default value on creation for the "fieldName" field.
DefaultFieldName string
// FieldNameValidator is a validator for the "fieldName" field. It is called by the builders before save.
FieldNameValidator func(string) error
// DefaultOldVal holds the default value on creation for the "oldVal" field.
DefaultOldVal string
// OldValValidator is a validator for the "oldVal" field. It is called by the builders before save.
OldValValidator func(string) error
// DefaultNewVal holds the default value on creation for the "newVal" field.
DefaultNewVal string
// NewValValidator is a validator for the "newVal" field. It is called by the builders before save.
NewValValidator func(string) error
// OperatorValidator is a validator for the "operator" field. It is called by the builders before save.
OperatorValidator func(string) error
// DefaultRemark holds the default value on creation for the "remark" field.
DefaultRemark string
// RemarkValidator is a validator for the "remark" field. It is called by the builders before save.
RemarkValidator func(string) error
// DefaultCreatedAt holds the default value on creation for the "createdAt" field.
DefaultCreatedAt func() time.Time
// 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 TorqueAuditLog 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()
}
// ByTorqueRecordId orders the results by the torqueRecordId field.
func ByTorqueRecordId(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldTorqueRecordId, opts...).ToFunc()
}
// ByAction orders the results by the action field.
func ByAction(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldAction, opts...).ToFunc()
}
// ByFieldName orders the results by the fieldName field.
func ByFieldName(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldFieldName, opts...).ToFunc()
}
// ByOldVal orders the results by the oldVal field.
func ByOldVal(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldOldVal, opts...).ToFunc()
}
// ByNewVal orders the results by the newVal field.
func ByNewVal(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldNewVal, opts...).ToFunc()
}
// ByOperator orders the results by the operator field.
func ByOperator(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldOperator, opts...).ToFunc()
}
// ByRemark orders the results by the remark field.
func ByRemark(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldRemark, opts...).ToFunc()
}
// ByCreatedAt orders the results by the createdAt field.
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
}