// Code generated by ent, DO NOT EDIT. package workpiecelifecyclelog import ( "time" "entgo.io/ent/dialect/sql" ) const ( // Label holds the string label denoting the workpiecelifecyclelog type in the database. Label = "workpiece_lifecycle_log" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldSn holds the string denoting the sn field in the database. FieldSn = "sn" // FieldWorkOrderNo holds the string denoting the workorderno field in the database. FieldWorkOrderNo = "work_order_no" // FieldAction holds the string denoting the action field in the database. FieldAction = "action" // FieldFromStatus holds the string denoting the fromstatus field in the database. FieldFromStatus = "from_status" // FieldToStatus holds the string denoting the tostatus field in the database. FieldToStatus = "to_status" // FieldStationNo holds the string denoting the stationno field in the database. FieldStationNo = "station_no" // FieldFlowSeq holds the string denoting the flowseq field in the database. FieldFlowSeq = "flow_seq" // FieldOperator holds the string denoting the operator field in the database. FieldOperator = "operator" // FieldSource holds the string denoting the source field in the database. FieldSource = "source" // 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 workpiecelifecyclelog in the database. Table = "workpiece_lifecycle_log" ) // Columns holds all SQL columns for workpiecelifecyclelog fields. var Columns = []string{ FieldID, FieldSn, FieldWorkOrderNo, FieldAction, FieldFromStatus, FieldToStatus, FieldStationNo, FieldFlowSeq, FieldOperator, FieldSource, 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 ( // SnValidator is a validator for the "sn" field. It is called by the builders before save. SnValidator func(string) error // DefaultWorkOrderNo holds the default value on creation for the "workOrderNo" field. DefaultWorkOrderNo string // WorkOrderNoValidator is a validator for the "workOrderNo" field. It is called by the builders before save. WorkOrderNoValidator func(string) error // ActionValidator is a validator for the "action" field. It is called by the builders before save. ActionValidator func(string) error // DefaultFromStatus holds the default value on creation for the "fromStatus" field. DefaultFromStatus string // FromStatusValidator is a validator for the "fromStatus" field. It is called by the builders before save. FromStatusValidator func(string) error // DefaultToStatus holds the default value on creation for the "toStatus" field. DefaultToStatus string // ToStatusValidator is a validator for the "toStatus" field. It is called by the builders before save. ToStatusValidator 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 // DefaultSource holds the default value on creation for the "source" field. DefaultSource string // SourceValidator is a validator for the "source" field. It is called by the builders before save. SourceValidator 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 WorkpieceLifecycleLog 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() } // BySn orders the results by the sn field. func BySn(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldSn, opts...).ToFunc() } // ByWorkOrderNo orders the results by the workOrderNo field. func ByWorkOrderNo(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldWorkOrderNo, opts...).ToFunc() } // ByAction orders the results by the action field. func ByAction(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldAction, opts...).ToFunc() } // ByFromStatus orders the results by the fromStatus field. func ByFromStatus(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldFromStatus, opts...).ToFunc() } // ByToStatus orders the results by the toStatus field. func ByToStatus(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldToStatus, opts...).ToFunc() } // ByStationNo orders the results by the stationNo field. func ByStationNo(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldStationNo, opts...).ToFunc() } // ByFlowSeq orders the results by the flowSeq field. func ByFlowSeq(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldFlowSeq, opts...).ToFunc() } // ByOperator orders the results by the operator field. func ByOperator(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldOperator, opts...).ToFunc() } // BySource orders the results by the source field. func BySource(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldSource, 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() }