初始化2
This commit is contained in:
@@ -0,0 +1,165 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package plcsendlog
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
)
|
||||
|
||||
const (
|
||||
// Label holds the string label denoting the plcsendlog type in the database.
|
||||
Label = "plc_send_log"
|
||||
// FieldID holds the string denoting the id field in the database.
|
||||
FieldID = "id"
|
||||
// FieldOrderNo holds the string denoting the orderno field in the database.
|
||||
FieldOrderNo = "order_no"
|
||||
// FieldSn holds the string denoting the sn field in the database.
|
||||
FieldSn = "sn"
|
||||
// FieldStationNo holds the string denoting the stationno field in the database.
|
||||
FieldStationNo = "station_no"
|
||||
// FieldProcessCombination holds the string denoting the processcombination field in the database.
|
||||
FieldProcessCombination = "process_combination"
|
||||
// FieldProcessCodes holds the string denoting the processcodes field in the database.
|
||||
FieldProcessCodes = "process_codes"
|
||||
// FieldStatus holds the string denoting the status field in the database.
|
||||
FieldStatus = "status"
|
||||
// FieldSendTime holds the string denoting the sendtime field in the database.
|
||||
FieldSendTime = "send_time"
|
||||
// FieldDoneTime holds the string denoting the donetime field in the database.
|
||||
FieldDoneTime = "done_time"
|
||||
// FieldAck holds the string denoting the ack field in the database.
|
||||
FieldAck = "ack"
|
||||
// FieldRemark holds the string denoting the remark field in the database.
|
||||
FieldRemark = "remark"
|
||||
// FieldOperator holds the string denoting the operator field in the database.
|
||||
FieldOperator = "operator"
|
||||
// FieldCreatedAt holds the string denoting the createdat field in the database.
|
||||
FieldCreatedAt = "created_at"
|
||||
// Table holds the table name of the plcsendlog in the database.
|
||||
Table = "plc_send_log"
|
||||
)
|
||||
|
||||
// Columns holds all SQL columns for plcsendlog fields.
|
||||
var Columns = []string{
|
||||
FieldID,
|
||||
FieldOrderNo,
|
||||
FieldSn,
|
||||
FieldStationNo,
|
||||
FieldProcessCombination,
|
||||
FieldProcessCodes,
|
||||
FieldStatus,
|
||||
FieldSendTime,
|
||||
FieldDoneTime,
|
||||
FieldAck,
|
||||
FieldRemark,
|
||||
FieldOperator,
|
||||
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 (
|
||||
// DefaultOrderNo holds the default value on creation for the "orderNo" field.
|
||||
DefaultOrderNo string
|
||||
// OrderNoValidator is a validator for the "orderNo" field. It is called by the builders before save.
|
||||
OrderNoValidator func(string) error
|
||||
// DefaultSn holds the default value on creation for the "sn" field.
|
||||
DefaultSn string
|
||||
// SnValidator is a validator for the "sn" field. It is called by the builders before save.
|
||||
SnValidator func(string) error
|
||||
// DefaultProcessCombination holds the default value on creation for the "processCombination" field.
|
||||
DefaultProcessCombination string
|
||||
// ProcessCombinationValidator is a validator for the "processCombination" field. It is called by the builders before save.
|
||||
ProcessCombinationValidator func(string) error
|
||||
// DefaultStatus holds the default value on creation for the "status" field.
|
||||
DefaultStatus string
|
||||
// StatusValidator is a validator for the "status" field. It is called by the builders before save.
|
||||
StatusValidator func(string) error
|
||||
// DefaultAck holds the default value on creation for the "ack" field.
|
||||
DefaultAck bool
|
||||
// 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
|
||||
// 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
|
||||
// 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 PlcSendLog 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()
|
||||
}
|
||||
|
||||
// ByOrderNo orders the results by the orderNo field.
|
||||
func ByOrderNo(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldOrderNo, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// BySn orders the results by the sn field.
|
||||
func BySn(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldSn, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByStationNo orders the results by the stationNo field.
|
||||
func ByStationNo(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldStationNo, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByProcessCombination orders the results by the processCombination field.
|
||||
func ByProcessCombination(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldProcessCombination, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByStatus orders the results by the status field.
|
||||
func ByStatus(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldStatus, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// BySendTime orders the results by the sendTime field.
|
||||
func BySendTime(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldSendTime, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByDoneTime orders the results by the doneTime field.
|
||||
func ByDoneTime(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldDoneTime, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByAck orders the results by the ack field.
|
||||
func ByAck(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldAck, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByRemark orders the results by the remark field.
|
||||
func ByRemark(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldRemark, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByOperator orders the results by the operator field.
|
||||
func ByOperator(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldOperator, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCreatedAt orders the results by the createdAt field.
|
||||
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
|
||||
}
|
||||
Reference in New Issue
Block a user