Files
bj_power/bj_power_wms/ent/outbounddetail/outbounddetail.go
T
2026-08-28 15:06:01 +08:00

103 lines
3.3 KiB
Go

// Code generated by ent, DO NOT EDIT.
package outbounddetail
import (
"entgo.io/ent/dialect/sql"
)
const (
// Label holds the string label denoting the outbounddetail type in the database.
Label = "outbound_detail"
// FieldID holds the string denoting the id field in the database.
FieldID = "id"
// FieldOutboundNo holds the string denoting the outbound_no field in the database.
FieldOutboundNo = "outbound_no"
// FieldSnCode holds the string denoting the sn_code field in the database.
FieldSnCode = "sn_code"
// FieldBatchNo holds the string denoting the batch_no field in the database.
FieldBatchNo = "batch_no"
// FieldMaterialCode holds the string denoting the material_code field in the database.
FieldMaterialCode = "material_code"
// FieldQuantity holds the string denoting the quantity field in the database.
FieldQuantity = "quantity"
// FieldOrderNo holds the string denoting the order_no field in the database.
FieldOrderNo = "order_no"
// FieldCreatedAt holds the string denoting the created_at field in the database.
FieldCreatedAt = "created_at"
// Table holds the table name of the outbounddetail in the database.
Table = "outbound_details"
)
// Columns holds all SQL columns for outbounddetail fields.
var Columns = []string{
FieldID,
FieldOutboundNo,
FieldSnCode,
FieldBatchNo,
FieldMaterialCode,
FieldQuantity,
FieldOrderNo,
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 (
// DefaultQuantity holds the default value on creation for the "quantity" field.
DefaultQuantity int
// DefaultCreatedAt holds the default value on creation for the "created_at" field.
DefaultCreatedAt func() int64
)
// OrderOption defines the ordering options for the OutboundDetail 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()
}
// ByOutboundNo orders the results by the outbound_no field.
func ByOutboundNo(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldOutboundNo, opts...).ToFunc()
}
// BySnCode orders the results by the sn_code field.
func BySnCode(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldSnCode, opts...).ToFunc()
}
// ByBatchNo orders the results by the batch_no field.
func ByBatchNo(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldBatchNo, opts...).ToFunc()
}
// ByMaterialCode orders the results by the material_code field.
func ByMaterialCode(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldMaterialCode, opts...).ToFunc()
}
// ByQuantity orders the results by the quantity field.
func ByQuantity(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldQuantity, opts...).ToFunc()
}
// ByOrderNo orders the results by the order_no field.
func ByOrderNo(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldOrderNo, opts...).ToFunc()
}
// ByCreatedAt orders the results by the created_at field.
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
}