179 lines
7.2 KiB
Go
179 lines
7.2 KiB
Go
// Code generated by ent, DO NOT EDIT.
|
|||
|
|
|
||
|
|
package agvtask
|
||
|
|
|
||
|
|
import (
|
||
|
|
"entgo.io/ent/dialect/sql"
|
||
|
|
)
|
||
|
|
|
||
|
|
const (
|
||
|
|
// Label holds the string label denoting the agvtask type in the database.
|
||
|
|
Label = "agv_task"
|
||
|
|
// FieldID holds the string denoting the id field in the database.
|
||
|
|
FieldID = "id"
|
||
|
|
// FieldTaskNo holds the string denoting the task_no field in the database.
|
||
|
|
FieldTaskNo = "task_no"
|
||
|
|
// FieldHikTaskCode holds the string denoting the hik_task_code field in the database.
|
||
|
|
FieldHikTaskCode = "hik_task_code"
|
||
|
|
// FieldSourceDock holds the string denoting the source_dock field in the database.
|
||
|
|
FieldSourceDock = "source_dock"
|
||
|
|
// FieldTargetDock holds the string denoting the target_dock field in the database.
|
||
|
|
FieldTargetDock = "target_dock"
|
||
|
|
// FieldMaterialsJSON holds the string denoting the materials_json field in the database.
|
||
|
|
FieldMaterialsJSON = "materials_json"
|
||
|
|
// FieldRelatedOutboundNo holds the string denoting the related_outbound_no field in the database.
|
||
|
|
FieldRelatedOutboundNo = "related_outbound_no"
|
||
|
|
// FieldStatus holds the string denoting the status field in the database.
|
||
|
|
FieldStatus = "status"
|
||
|
|
// FieldOperator holds the string denoting the operator field in the database.
|
||
|
|
FieldOperator = "operator"
|
||
|
|
// FieldDispatchedAt holds the string denoting the dispatched_at field in the database.
|
||
|
|
FieldDispatchedAt = "dispatched_at"
|
||
|
|
// FieldArrivedAt holds the string denoting the arrived_at field in the database.
|
||
|
|
FieldArrivedAt = "arrived_at"
|
||
|
|
// FieldRemark holds the string denoting the remark field in the database.
|
||
|
|
FieldRemark = "remark"
|
||
|
|
// FieldCreatedAt holds the string denoting the created_at field in the database.
|
||
|
|
FieldCreatedAt = "created_at"
|
||
|
|
// Table holds the table name of the agvtask in the database.
|
||
|
|
Table = "agv_tasks"
|
||
|
|
)
|
||
|
|
|
||
|
|
// Columns holds all SQL columns for agvtask fields.
|
||
|
|
var Columns = []string{
|
||
|
|
FieldID,
|
||
|
|
FieldTaskNo,
|
||
|
|
FieldHikTaskCode,
|
||
|
|
FieldSourceDock,
|
||
|
|
FieldTargetDock,
|
||
|
|
FieldMaterialsJSON,
|
||
|
|
FieldRelatedOutboundNo,
|
||
|
|
FieldStatus,
|
||
|
|
FieldOperator,
|
||
|
|
FieldDispatchedAt,
|
||
|
|
FieldArrivedAt,
|
||
|
|
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 (
|
||
|
|
// TaskNoValidator is a validator for the "task_no" field. It is called by the builders before save.
|
||
|
|
TaskNoValidator func(string) error
|
||
|
|
// DefaultHikTaskCode holds the default value on creation for the "hik_task_code" field.
|
||
|
|
DefaultHikTaskCode string
|
||
|
|
// HikTaskCodeValidator is a validator for the "hik_task_code" field. It is called by the builders before save.
|
||
|
|
HikTaskCodeValidator func(string) error
|
||
|
|
// DefaultSourceDock holds the default value on creation for the "source_dock" field.
|
||
|
|
DefaultSourceDock string
|
||
|
|
// SourceDockValidator is a validator for the "source_dock" field. It is called by the builders before save.
|
||
|
|
SourceDockValidator func(string) error
|
||
|
|
// DefaultTargetDock holds the default value on creation for the "target_dock" field.
|
||
|
|
DefaultTargetDock string
|
||
|
|
// TargetDockValidator is a validator for the "target_dock" field. It is called by the builders before save.
|
||
|
|
TargetDockValidator func(string) error
|
||
|
|
// DefaultMaterialsJSON holds the default value on creation for the "materials_json" field.
|
||
|
|
DefaultMaterialsJSON string
|
||
|
|
// MaterialsJSONValidator is a validator for the "materials_json" field. It is called by the builders before save.
|
||
|
|
MaterialsJSONValidator func(string) error
|
||
|
|
// DefaultRelatedOutboundNo holds the default value on creation for the "related_outbound_no" field.
|
||
|
|
DefaultRelatedOutboundNo string
|
||
|
|
// RelatedOutboundNoValidator is a validator for the "related_outbound_no" field. It is called by the builders before save.
|
||
|
|
RelatedOutboundNoValidator 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
|
||
|
|
// 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
|
||
|
|
// DefaultDispatchedAt holds the default value on creation for the "dispatched_at" field.
|
||
|
|
DefaultDispatchedAt int64
|
||
|
|
// DefaultArrivedAt holds the default value on creation for the "arrived_at" field.
|
||
|
|
DefaultArrivedAt int64
|
||
|
|
// 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 "created_at" field.
|
||
|
|
DefaultCreatedAt func() int64
|
||
|
|
)
|
||
|
|
|
||
|
|
// OrderOption defines the ordering options for the AgvTask 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()
|
||
|
|
}
|
||
|
|
|
||
|
|
// ByTaskNo orders the results by the task_no field.
|
||
|
|
func ByTaskNo(opts ...sql.OrderTermOption) OrderOption {
|
||
|
|
return sql.OrderByField(FieldTaskNo, opts...).ToFunc()
|
||
|
|
}
|
||
|
|
|
||
|
|
// ByHikTaskCode orders the results by the hik_task_code field.
|
||
|
|
func ByHikTaskCode(opts ...sql.OrderTermOption) OrderOption {
|
||
|
|
return sql.OrderByField(FieldHikTaskCode, opts...).ToFunc()
|
||
|
|
}
|
||
|
|
|
||
|
|
// BySourceDock orders the results by the source_dock field.
|
||
|
|
func BySourceDock(opts ...sql.OrderTermOption) OrderOption {
|
||
|
|
return sql.OrderByField(FieldSourceDock, opts...).ToFunc()
|
||
|
|
}
|
||
|
|
|
||
|
|
// ByTargetDock orders the results by the target_dock field.
|
||
|
|
func ByTargetDock(opts ...sql.OrderTermOption) OrderOption {
|
||
|
|
return sql.OrderByField(FieldTargetDock, opts...).ToFunc()
|
||
|
|
}
|
||
|
|
|
||
|
|
// ByMaterialsJSON orders the results by the materials_json field.
|
||
|
|
func ByMaterialsJSON(opts ...sql.OrderTermOption) OrderOption {
|
||
|
|
return sql.OrderByField(FieldMaterialsJSON, opts...).ToFunc()
|
||
|
|
}
|
||
|
|
|
||
|
|
// ByRelatedOutboundNo orders the results by the related_outbound_no field.
|
||
|
|
func ByRelatedOutboundNo(opts ...sql.OrderTermOption) OrderOption {
|
||
|
|
return sql.OrderByField(FieldRelatedOutboundNo, opts...).ToFunc()
|
||
|
|
}
|
||
|
|
|
||
|
|
// ByStatus orders the results by the status field.
|
||
|
|
func ByStatus(opts ...sql.OrderTermOption) OrderOption {
|
||
|
|
return sql.OrderByField(FieldStatus, opts...).ToFunc()
|
||
|
|
}
|
||
|
|
|
||
|
|
// ByOperator orders the results by the operator field.
|
||
|
|
func ByOperator(opts ...sql.OrderTermOption) OrderOption {
|
||
|
|
return sql.OrderByField(FieldOperator, opts...).ToFunc()
|
||
|
|
}
|
||
|
|
|
||
|
|
// ByDispatchedAt orders the results by the dispatched_at field.
|
||
|
|
func ByDispatchedAt(opts ...sql.OrderTermOption) OrderOption {
|
||
|
|
return sql.OrderByField(FieldDispatchedAt, opts...).ToFunc()
|
||
|
|
}
|
||
|
|
|
||
|
|
// ByArrivedAt orders the results by the arrived_at field.
|
||
|
|
func ByArrivedAt(opts ...sql.OrderTermOption) OrderOption {
|
||
|
|
return sql.OrderByField(FieldArrivedAt, 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 created_at field.
|
||
|
|
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
|
||
|
|
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
|
||
|
|
}
|