// Code generated by ent, DO NOT EDIT. package deliveryorderitem import ( "entgo.io/ent/dialect/sql" ) const ( // Label holds the string label denoting the deliveryorderitem type in the database. Label = "delivery_order_item" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldDeliveryNo holds the string denoting the deliveryno field in the database. FieldDeliveryNo = "delivery_no" // FieldRequestNo holds the string denoting the requestno field in the database. FieldRequestNo = "request_no" // FieldMaterialCode holds the string denoting the materialcode field in the database. FieldMaterialCode = "material_code" // FieldMaterialName holds the string denoting the materialname field in the database. FieldMaterialName = "material_name" // FieldUnit holds the string denoting the unit field in the database. FieldUnit = "unit" // FieldQty holds the string denoting the qty field in the database. FieldQty = "qty" // FieldStationNo holds the string denoting the stationno field in the database. FieldStationNo = "station_no" // FieldOrderNo holds the string denoting the orderno field in the database. FieldOrderNo = "order_no" // FieldFlowName holds the string denoting the flowname field in the database. FieldFlowName = "flow_name" // FieldPlanDate holds the string denoting the plandate field in the database. FieldPlanDate = "plan_date" // FieldSnMode holds the string denoting the snmode field in the database. FieldSnMode = "sn_mode" // Table holds the table name of the deliveryorderitem in the database. Table = "delivery_order_item" ) // Columns holds all SQL columns for deliveryorderitem fields. var Columns = []string{ FieldID, FieldDeliveryNo, FieldRequestNo, FieldMaterialCode, FieldMaterialName, FieldUnit, FieldQty, FieldStationNo, FieldOrderNo, FieldFlowName, FieldPlanDate, FieldSnMode, } // 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 ( // DeliveryNoValidator is a validator for the "deliveryNo" field. It is called by the builders before save. DeliveryNoValidator func(string) error // DefaultRequestNo holds the default value on creation for the "requestNo" field. DefaultRequestNo string // RequestNoValidator is a validator for the "requestNo" field. It is called by the builders before save. RequestNoValidator func(string) error // MaterialCodeValidator is a validator for the "materialCode" field. It is called by the builders before save. MaterialCodeValidator func(string) error // DefaultMaterialName holds the default value on creation for the "materialName" field. DefaultMaterialName string // MaterialNameValidator is a validator for the "materialName" field. It is called by the builders before save. MaterialNameValidator func(string) error // DefaultUnit holds the default value on creation for the "unit" field. DefaultUnit string // UnitValidator is a validator for the "unit" field. It is called by the builders before save. UnitValidator func(string) error // DefaultQty holds the default value on creation for the "qty" field. DefaultQty float64 // DefaultStationNo holds the default value on creation for the "stationNo" field. DefaultStationNo int // DefaultOrderNo holds the default value on creation for the "orderNo" field. DefaultOrderNo string // OrderNoValidator is a validator for the "orderNo" field. It is called by the builders before save. OrderNoValidator func(string) error // DefaultFlowName holds the default value on creation for the "flowName" field. DefaultFlowName string // FlowNameValidator is a validator for the "flowName" field. It is called by the builders before save. FlowNameValidator func(string) error // DefaultPlanDate holds the default value on creation for the "planDate" field. DefaultPlanDate string // PlanDateValidator is a validator for the "planDate" field. It is called by the builders before save. PlanDateValidator func(string) error // DefaultSnMode holds the default value on creation for the "snMode" field. DefaultSnMode int // IDValidator is a validator for the "id" field. It is called by the builders before save. IDValidator func(int) error ) // OrderOption defines the ordering options for the DeliveryOrderItem 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() } // ByDeliveryNo orders the results by the deliveryNo field. func ByDeliveryNo(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldDeliveryNo, opts...).ToFunc() } // ByRequestNo orders the results by the requestNo field. func ByRequestNo(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldRequestNo, opts...).ToFunc() } // ByMaterialCode orders the results by the materialCode field. func ByMaterialCode(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldMaterialCode, opts...).ToFunc() } // ByMaterialName orders the results by the materialName field. func ByMaterialName(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldMaterialName, opts...).ToFunc() } // ByUnit orders the results by the unit field. func ByUnit(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldUnit, opts...).ToFunc() } // ByQty orders the results by the qty field. func ByQty(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldQty, opts...).ToFunc() } // ByStationNo orders the results by the stationNo field. func ByStationNo(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldStationNo, opts...).ToFunc() } // ByOrderNo orders the results by the orderNo field. func ByOrderNo(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldOrderNo, opts...).ToFunc() } // ByFlowName orders the results by the flowName field. func ByFlowName(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldFlowName, opts...).ToFunc() } // ByPlanDate orders the results by the planDate field. func ByPlanDate(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldPlanDate, opts...).ToFunc() } // BySnMode orders the results by the snMode field. func BySnMode(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldSnMode, opts...).ToFunc() }