2026-11-03 10:17:49 +08:00
|
|
|
// Code generated by ent, DO NOT EDIT.
|
|
|
|
|
|
|
|
|
|
package agvpoint
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"time"
|
|
|
|
|
|
|
|
|
|
"entgo.io/ent/dialect/sql"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
const (
|
|
|
|
|
// Label holds the string label denoting the agvpoint type in the database.
|
|
|
|
|
Label = "agv_point"
|
|
|
|
|
// FieldID holds the string denoting the id field in the database.
|
|
|
|
|
FieldID = "id"
|
|
|
|
|
// FieldPositionCode holds the string denoting the position_code field in the database.
|
|
|
|
|
FieldPositionCode = "position_code"
|
|
|
|
|
// FieldName holds the string denoting the name field in the database.
|
|
|
|
|
FieldName = "name"
|
|
|
|
|
// FieldIsDock holds the string denoting the is_dock field in the database.
|
|
|
|
|
FieldIsDock = "is_dock"
|
|
|
|
|
// FieldDockID holds the string denoting the dock_id field in the database.
|
|
|
|
|
FieldDockID = "dock_id"
|
|
|
|
|
// FieldEnabled holds the string denoting the enabled field in the database.
|
|
|
|
|
FieldEnabled = "enabled"
|
2026-11-07 15:06:00 +08:00
|
|
|
// FieldLocked holds the string denoting the locked field in the database.
|
|
|
|
|
FieldLocked = "locked"
|
|
|
|
|
// FieldLockedBy holds the string denoting the locked_by field in the database.
|
|
|
|
|
FieldLockedBy = "locked_by"
|
|
|
|
|
// FieldLockedReason holds the string denoting the locked_reason field in the database.
|
|
|
|
|
FieldLockedReason = "locked_reason"
|
|
|
|
|
// FieldLockedAt holds the string denoting the locked_at field in the database.
|
|
|
|
|
FieldLockedAt = "locked_at"
|
|
|
|
|
// FieldForcePick holds the string denoting the force_pick field in the database.
|
|
|
|
|
FieldForcePick = "force_pick"
|
|
|
|
|
// FieldForcePickAt holds the string denoting the force_pick_at field in the database.
|
|
|
|
|
FieldForcePickAt = "force_pick_at"
|
2026-11-03 10:17:49 +08:00
|
|
|
// FieldCreatedAt holds the string denoting the created_at field in the database.
|
|
|
|
|
FieldCreatedAt = "created_at"
|
|
|
|
|
// Table holds the table name of the agvpoint in the database.
|
|
|
|
|
Table = "agv_point"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// Columns holds all SQL columns for agvpoint fields.
|
|
|
|
|
var Columns = []string{
|
|
|
|
|
FieldID,
|
|
|
|
|
FieldPositionCode,
|
|
|
|
|
FieldName,
|
|
|
|
|
FieldIsDock,
|
|
|
|
|
FieldDockID,
|
|
|
|
|
FieldEnabled,
|
2026-11-07 15:06:00 +08:00
|
|
|
FieldLocked,
|
|
|
|
|
FieldLockedBy,
|
|
|
|
|
FieldLockedReason,
|
|
|
|
|
FieldLockedAt,
|
|
|
|
|
FieldForcePick,
|
|
|
|
|
FieldForcePickAt,
|
2026-11-03 10:17:49 +08:00
|
|
|
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 (
|
|
|
|
|
// PositionCodeValidator is a validator for the "position_code" field. It is called by the builders before save.
|
|
|
|
|
PositionCodeValidator func(string) error
|
|
|
|
|
// DefaultName holds the default value on creation for the "name" field.
|
|
|
|
|
DefaultName string
|
|
|
|
|
// NameValidator is a validator for the "name" field. It is called by the builders before save.
|
|
|
|
|
NameValidator func(string) error
|
|
|
|
|
// DefaultIsDock holds the default value on creation for the "is_dock" field.
|
|
|
|
|
DefaultIsDock bool
|
|
|
|
|
// DefaultEnabled holds the default value on creation for the "enabled" field.
|
|
|
|
|
DefaultEnabled bool
|
2026-11-07 15:06:00 +08:00
|
|
|
// DefaultLocked holds the default value on creation for the "locked" field.
|
|
|
|
|
DefaultLocked bool
|
|
|
|
|
// DefaultLockedBy holds the default value on creation for the "locked_by" field.
|
|
|
|
|
DefaultLockedBy string
|
|
|
|
|
// LockedByValidator is a validator for the "locked_by" field. It is called by the builders before save.
|
|
|
|
|
LockedByValidator func(string) error
|
|
|
|
|
// DefaultLockedReason holds the default value on creation for the "locked_reason" field.
|
|
|
|
|
DefaultLockedReason string
|
|
|
|
|
// LockedReasonValidator is a validator for the "locked_reason" field. It is called by the builders before save.
|
|
|
|
|
LockedReasonValidator func(string) error
|
|
|
|
|
// DefaultLockedAt holds the default value on creation for the "locked_at" field.
|
|
|
|
|
DefaultLockedAt int64
|
|
|
|
|
// DefaultForcePick holds the default value on creation for the "force_pick" field.
|
|
|
|
|
DefaultForcePick bool
|
|
|
|
|
// DefaultForcePickAt holds the default value on creation for the "force_pick_at" field.
|
|
|
|
|
DefaultForcePickAt int64
|
2026-11-03 10:17:49 +08:00
|
|
|
// DefaultCreatedAt holds the default value on creation for the "created_at" field.
|
|
|
|
|
DefaultCreatedAt func() time.Time
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// OrderOption defines the ordering options for the AgvPoint 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()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ByPositionCode orders the results by the position_code field.
|
|
|
|
|
func ByPositionCode(opts ...sql.OrderTermOption) OrderOption {
|
|
|
|
|
return sql.OrderByField(FieldPositionCode, opts...).ToFunc()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ByName orders the results by the name field.
|
|
|
|
|
func ByName(opts ...sql.OrderTermOption) OrderOption {
|
|
|
|
|
return sql.OrderByField(FieldName, opts...).ToFunc()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ByIsDock orders the results by the is_dock field.
|
|
|
|
|
func ByIsDock(opts ...sql.OrderTermOption) OrderOption {
|
|
|
|
|
return sql.OrderByField(FieldIsDock, opts...).ToFunc()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ByDockID orders the results by the dock_id field.
|
|
|
|
|
func ByDockID(opts ...sql.OrderTermOption) OrderOption {
|
|
|
|
|
return sql.OrderByField(FieldDockID, opts...).ToFunc()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ByEnabled orders the results by the enabled field.
|
|
|
|
|
func ByEnabled(opts ...sql.OrderTermOption) OrderOption {
|
|
|
|
|
return sql.OrderByField(FieldEnabled, opts...).ToFunc()
|
|
|
|
|
}
|
|
|
|
|
|
2026-11-07 15:06:00 +08:00
|
|
|
// ByLocked orders the results by the locked field.
|
|
|
|
|
func ByLocked(opts ...sql.OrderTermOption) OrderOption {
|
|
|
|
|
return sql.OrderByField(FieldLocked, opts...).ToFunc()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ByLockedBy orders the results by the locked_by field.
|
|
|
|
|
func ByLockedBy(opts ...sql.OrderTermOption) OrderOption {
|
|
|
|
|
return sql.OrderByField(FieldLockedBy, opts...).ToFunc()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ByLockedReason orders the results by the locked_reason field.
|
|
|
|
|
func ByLockedReason(opts ...sql.OrderTermOption) OrderOption {
|
|
|
|
|
return sql.OrderByField(FieldLockedReason, opts...).ToFunc()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ByLockedAt orders the results by the locked_at field.
|
|
|
|
|
func ByLockedAt(opts ...sql.OrderTermOption) OrderOption {
|
|
|
|
|
return sql.OrderByField(FieldLockedAt, opts...).ToFunc()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ByForcePick orders the results by the force_pick field.
|
|
|
|
|
func ByForcePick(opts ...sql.OrderTermOption) OrderOption {
|
|
|
|
|
return sql.OrderByField(FieldForcePick, opts...).ToFunc()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ByForcePickAt orders the results by the force_pick_at field.
|
|
|
|
|
func ByForcePickAt(opts ...sql.OrderTermOption) OrderOption {
|
|
|
|
|
return sql.OrderByField(FieldForcePickAt, opts...).ToFunc()
|
|
|
|
|
}
|
|
|
|
|
|
2026-11-03 10:17:49 +08:00
|
|
|
// ByCreatedAt orders the results by the created_at field.
|
|
|
|
|
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
|
|
|
|
|
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
|
|
|
|
|
}
|