初始化
This commit is contained in:
@@ -1,138 +0,0 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package serialnumber
|
||||
|
||||
import (
|
||||
"entgo.io/ent/dialect/sql"
|
||||
)
|
||||
|
||||
const (
|
||||
// Label holds the string label denoting the serialnumber type in the database.
|
||||
Label = "serial_number"
|
||||
// FieldID holds the string denoting the id field in the database.
|
||||
FieldID = "id"
|
||||
// FieldSnCode holds the string denoting the sn_code field in the database.
|
||||
FieldSnCode = "sn_code"
|
||||
// FieldMaterialCode holds the string denoting the material_code field in the database.
|
||||
FieldMaterialCode = "material_code"
|
||||
// FieldBatchNo holds the string denoting the batch_no field in the database.
|
||||
FieldBatchNo = "batch_no"
|
||||
// FieldStatus holds the string denoting the status field in the database.
|
||||
FieldStatus = "status"
|
||||
// FieldCurrentZone holds the string denoting the current_zone field in the database.
|
||||
FieldCurrentZone = "current_zone"
|
||||
// FieldQualityStatus holds the string denoting the quality_status field in the database.
|
||||
FieldQualityStatus = "quality_status"
|
||||
// FieldLastInboundAt holds the string denoting the last_inbound_at field in the database.
|
||||
FieldLastInboundAt = "last_inbound_at"
|
||||
// FieldLastOutboundAt holds the string denoting the last_outbound_at field in the database.
|
||||
FieldLastOutboundAt = "last_outbound_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"
|
||||
// FieldUpdatedAt holds the string denoting the updated_at field in the database.
|
||||
FieldUpdatedAt = "updated_at"
|
||||
// Table holds the table name of the serialnumber in the database.
|
||||
Table = "serial_numbers"
|
||||
)
|
||||
|
||||
// Columns holds all SQL columns for serialnumber fields.
|
||||
var Columns = []string{
|
||||
FieldID,
|
||||
FieldSnCode,
|
||||
FieldMaterialCode,
|
||||
FieldBatchNo,
|
||||
FieldStatus,
|
||||
FieldCurrentZone,
|
||||
FieldQualityStatus,
|
||||
FieldLastInboundAt,
|
||||
FieldLastOutboundAt,
|
||||
FieldRemark,
|
||||
FieldCreatedAt,
|
||||
FieldUpdatedAt,
|
||||
}
|
||||
|
||||
// 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 (
|
||||
// DefaultStatus holds the default value on creation for the "status" field.
|
||||
DefaultStatus string
|
||||
// DefaultQualityStatus holds the default value on creation for the "quality_status" field.
|
||||
DefaultQualityStatus string
|
||||
// DefaultCreatedAt holds the default value on creation for the "created_at" field.
|
||||
DefaultCreatedAt func() int64
|
||||
// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
|
||||
DefaultUpdatedAt func() int64
|
||||
)
|
||||
|
||||
// OrderOption defines the ordering options for the SerialNumber 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()
|
||||
}
|
||||
|
||||
// BySnCode orders the results by the sn_code field.
|
||||
func BySnCode(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldSnCode, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByMaterialCode orders the results by the material_code field.
|
||||
func ByMaterialCode(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldMaterialCode, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByBatchNo orders the results by the batch_no field.
|
||||
func ByBatchNo(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldBatchNo, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByStatus orders the results by the status field.
|
||||
func ByStatus(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldStatus, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCurrentZone orders the results by the current_zone field.
|
||||
func ByCurrentZone(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCurrentZone, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByQualityStatus orders the results by the quality_status field.
|
||||
func ByQualityStatus(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldQualityStatus, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByLastInboundAt orders the results by the last_inbound_at field.
|
||||
func ByLastInboundAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldLastInboundAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByLastOutboundAt orders the results by the last_outbound_at field.
|
||||
func ByLastOutboundAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldLastOutboundAt, 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()
|
||||
}
|
||||
|
||||
// ByUpdatedAt orders the results by the updated_at field.
|
||||
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldUpdatedAt, opts...).ToFunc()
|
||||
}
|
||||
Reference in New Issue
Block a user