// Code generated by ent, DO NOT EDIT. package semifinished import ( "entgo.io/ent/dialect/sql" ) const ( // Label holds the string label denoting the semifinished type in the database. Label = "semi_finished" // 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" // FieldMaterialCode holds the string denoting the material_code field in the database. FieldMaterialCode = "material_code" // FieldCompletedProcess holds the string denoting the completed_process field in the database. FieldCompletedProcess = "completed_process" // FieldQuantity holds the string denoting the quantity field in the database. FieldQuantity = "quantity" // FieldZoneCode holds the string denoting the zone_code field in the database. FieldZoneCode = "zone_code" // FieldStatus holds the string denoting the status field in the database. FieldStatus = "status" // 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" // FieldUpdatedAt holds the string denoting the updated_at field in the database. FieldUpdatedAt = "updated_at" // Table holds the table name of the semifinished in the database. Table = "semi_finisheds" ) // Columns holds all SQL columns for semifinished fields. var Columns = []string{ FieldID, FieldSn, FieldMaterialCode, FieldCompletedProcess, FieldQuantity, FieldZoneCode, FieldStatus, FieldOrderNo, 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 ( // DefaultQuantity holds the default value on creation for the "quantity" field. DefaultQuantity int // DefaultStatus holds the default value on creation for the "status" field. DefaultStatus 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 SemiFinished 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() } // ByMaterialCode orders the results by the material_code field. func ByMaterialCode(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldMaterialCode, opts...).ToFunc() } // ByCompletedProcess orders the results by the completed_process field. func ByCompletedProcess(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldCompletedProcess, opts...).ToFunc() } // ByQuantity orders the results by the quantity field. func ByQuantity(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldQuantity, opts...).ToFunc() } // ByZoneCode orders the results by the zone_code field. func ByZoneCode(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldZoneCode, opts...).ToFunc() } // ByStatus orders the results by the status field. func ByStatus(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldStatus, 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() } // ByUpdatedAt orders the results by the updated_at field. func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldUpdatedAt, opts...).ToFunc() }