// Code generated by ent, DO NOT EDIT. package paymentauditlog import ( "time" "entgo.io/ent/dialect/sql" ) const ( // Label holds the string label denoting the paymentauditlog type in the database. Label = "payment_audit_log" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldOrderID holds the string denoting the order_id field in the database. FieldOrderID = "order_id" // FieldAction holds the string denoting the action field in the database. FieldAction = "action" // FieldDetail holds the string denoting the detail field in the database. FieldDetail = "detail" // FieldOperator holds the string denoting the operator field in the database. FieldOperator = "operator" // FieldCreatedAt holds the string denoting the created_at field in the database. FieldCreatedAt = "created_at" // Table holds the table name of the paymentauditlog in the database. Table = "payment_audit_logs" ) // Columns holds all SQL columns for paymentauditlog fields. var Columns = []string{ FieldID, FieldOrderID, FieldAction, FieldDetail, FieldOperator, 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 ( // OrderIDValidator is a validator for the "order_id" field. It is called by the builders before save. OrderIDValidator func(string) error // ActionValidator is a validator for the "action" field. It is called by the builders before save. ActionValidator func(string) error // DefaultDetail holds the default value on creation for the "detail" field. DefaultDetail string // DefaultOperator holds the default value on creation for the "operator" field. DefaultOperator string // OperatorValidator is a validator for the "operator" field. It is called by the builders before save. OperatorValidator func(string) error // DefaultCreatedAt holds the default value on creation for the "created_at" field. DefaultCreatedAt func() time.Time ) // OrderOption defines the ordering options for the PaymentAuditLog 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() } // ByOrderID orders the results by the order_id field. func ByOrderID(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldOrderID, opts...).ToFunc() } // ByAction orders the results by the action field. func ByAction(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldAction, opts...).ToFunc() } // ByDetail orders the results by the detail field. func ByDetail(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldDetail, opts...).ToFunc() } // ByOperator orders the results by the operator field. func ByOperator(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldOperator, opts...).ToFunc() } // ByCreatedAt orders the results by the created_at field. func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldCreatedAt, opts...).ToFunc() }