// Code generated by ent, DO NOT EDIT. package ordermaterialledger import ( "entgo.io/ent/dialect/sql" ) const ( // Label holds the string label denoting the ordermaterialledger type in the database. Label = "order_material_ledger" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldOrderNo holds the string denoting the order_no field in the database. FieldOrderNo = "order_no" // FieldMaterialCode holds the string denoting the material_code field in the database. FieldMaterialCode = "material_code" // FieldMaterialName holds the string denoting the material_name field in the database. FieldMaterialName = "material_name" // FieldTotalQty holds the string denoting the total_qty field in the database. FieldTotalQty = "total_qty" // FieldOutQty holds the string denoting the out_qty field in the database. FieldOutQty = "out_qty" // FieldStatus holds the string denoting the status field in the database. FieldStatus = "status" // 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 ordermaterialledger in the database. Table = "order_material_ledgers" ) // Columns holds all SQL columns for ordermaterialledger fields. var Columns = []string{ FieldID, FieldOrderNo, FieldMaterialCode, FieldMaterialName, FieldTotalQty, FieldOutQty, FieldStatus, 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 ( // DefaultTotalQty holds the default value on creation for the "total_qty" field. DefaultTotalQty int // DefaultOutQty holds the default value on creation for the "out_qty" field. DefaultOutQty 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 OrderMaterialLedger 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() } // ByOrderNo orders the results by the order_no field. func ByOrderNo(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldOrderNo, opts...).ToFunc() } // ByMaterialCode orders the results by the material_code field. func ByMaterialCode(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldMaterialCode, opts...).ToFunc() } // ByMaterialName orders the results by the material_name field. func ByMaterialName(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldMaterialName, opts...).ToFunc() } // ByTotalQty orders the results by the total_qty field. func ByTotalQty(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldTotalQty, opts...).ToFunc() } // ByOutQty orders the results by the out_qty field. func ByOutQty(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldOutQty, opts...).ToFunc() } // ByStatus orders the results by the status field. func ByStatus(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldStatus, 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() }