// Code generated by ent, DO NOT EDIT. package paynotifytask import ( "time" "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" ) const ( // Label holds the string label denoting the paynotifytask type in the database. Label = "pay_notify_task" // FieldID holds the string denoting the id field in the database. FieldID = "id" // 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" // FieldStatus holds the string denoting the status field in the database. FieldStatus = "status" // FieldTenantID holds the string denoting the tenant_id field in the database. FieldTenantID = "tenant_id" // FieldDeletedAt holds the string denoting the deleted_at field in the database. FieldDeletedAt = "deleted_at" // FieldType holds the string denoting the type field in the database. FieldType = "type" // FieldDataID holds the string denoting the data_id field in the database. FieldDataID = "data_id" // FieldOrderID holds the string denoting the order_id field in the database. FieldOrderID = "order_id" // FieldAppID holds the string denoting the app_id field in the database. FieldAppID = "app_id" // FieldNotifyStatus holds the string denoting the notify_status field in the database. FieldNotifyStatus = "notify_status" // FieldNextNotifyTime holds the string denoting the next_notify_time field in the database. FieldNextNotifyTime = "next_notify_time" // FieldLastExecuteTime holds the string denoting the last_execute_time field in the database. FieldLastExecuteTime = "last_execute_time" // FieldRetryCount holds the string denoting the retry_count field in the database. FieldRetryCount = "retry_count" // FieldMaxRetryCount holds the string denoting the max_retry_count field in the database. FieldMaxRetryCount = "max_retry_count" // FieldNotifyURL holds the string denoting the notify_url field in the database. FieldNotifyURL = "notify_url" // EdgeApp holds the string denoting the app edge name in mutations. EdgeApp = "app" // EdgeOrder holds the string denoting the order edge name in mutations. EdgeOrder = "order" // EdgeNotifyLog holds the string denoting the notify_log edge name in mutations. EdgeNotifyLog = "notify_log" // Table holds the table name of the paynotifytask in the database. Table = "pay_notify_task" // AppTable is the table that holds the app relation/edge. AppTable = "pay_notify_task" // AppInverseTable is the table name for the App entity. // It exists in this package in order to avoid circular dependency with the "app" package. AppInverseTable = "pay_app" // AppColumn is the table column denoting the app relation/edge. AppColumn = "app_id" // OrderTable is the table that holds the order relation/edge. OrderTable = "pay_notify_task" // OrderInverseTable is the table name for the PayOrder entity. // It exists in this package in order to avoid circular dependency with the "payorder" package. OrderInverseTable = "pay_order" // OrderColumn is the table column denoting the order relation/edge. OrderColumn = "order_id" // NotifyLogTable is the table that holds the notify_log relation/edge. NotifyLogTable = "pay_notify_log" // NotifyLogInverseTable is the table name for the PayNotifyLog entity. // It exists in this package in order to avoid circular dependency with the "paynotifylog" package. NotifyLogInverseTable = "pay_notify_log" // NotifyLogColumn is the table column denoting the notify_log relation/edge. NotifyLogColumn = "task_id" ) // Columns holds all SQL columns for paynotifytask fields. var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldStatus, FieldTenantID, FieldDeletedAt, FieldType, FieldDataID, FieldOrderID, FieldAppID, FieldNotifyStatus, FieldNextNotifyTime, FieldLastExecuteTime, FieldRetryCount, FieldMaxRetryCount, FieldNotifyURL, } // 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 ( // DefaultCreatedAt holds the default value on creation for the "created_at" field. DefaultCreatedAt func() time.Time // DefaultUpdatedAt holds the default value on creation for the "updated_at" field. DefaultUpdatedAt func() time.Time // UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field. UpdateDefaultUpdatedAt func() time.Time // DefaultStatus holds the default value on creation for the "status" field. DefaultStatus uint8 // DefaultTenantID holds the default value on creation for the "tenant_id" field. DefaultTenantID uint64 // DefaultType holds the default value on creation for the "type" field. DefaultType uint8 ) // OrderOption defines the ordering options for the PayNotifyTask 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() } // 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() } // ByStatus orders the results by the status field. func ByStatus(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldStatus, opts...).ToFunc() } // ByTenantID orders the results by the tenant_id field. func ByTenantID(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldTenantID, opts...).ToFunc() } // ByDeletedAt orders the results by the deleted_at field. func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldDeletedAt, opts...).ToFunc() } // ByType orders the results by the type field. func ByType(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldType, opts...).ToFunc() } // ByDataID orders the results by the data_id field. func ByDataID(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldDataID, opts...).ToFunc() } // ByOrderID orders the results by the order_id field. func ByOrderID(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldOrderID, opts...).ToFunc() } // ByAppID orders the results by the app_id field. func ByAppID(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldAppID, opts...).ToFunc() } // ByNotifyStatus orders the results by the notify_status field. func ByNotifyStatus(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldNotifyStatus, opts...).ToFunc() } // ByNextNotifyTime orders the results by the next_notify_time field. func ByNextNotifyTime(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldNextNotifyTime, opts...).ToFunc() } // ByLastExecuteTime orders the results by the last_execute_time field. func ByLastExecuteTime(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldLastExecuteTime, opts...).ToFunc() } // ByRetryCount orders the results by the retry_count field. func ByRetryCount(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldRetryCount, opts...).ToFunc() } // ByMaxRetryCount orders the results by the max_retry_count field. func ByMaxRetryCount(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldMaxRetryCount, opts...).ToFunc() } // ByNotifyURL orders the results by the notify_url field. func ByNotifyURL(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldNotifyURL, opts...).ToFunc() } // ByAppField orders the results by app field. func ByAppField(field string, opts ...sql.OrderTermOption) OrderOption { return func(s *sql.Selector) { sqlgraph.OrderByNeighborTerms(s, newAppStep(), sql.OrderByField(field, opts...)) } } // ByOrderField orders the results by order field. func ByOrderField(field string, opts ...sql.OrderTermOption) OrderOption { return func(s *sql.Selector) { sqlgraph.OrderByNeighborTerms(s, newOrderStep(), sql.OrderByField(field, opts...)) } } // ByNotifyLogCount orders the results by notify_log count. func ByNotifyLogCount(opts ...sql.OrderTermOption) OrderOption { return func(s *sql.Selector) { sqlgraph.OrderByNeighborsCount(s, newNotifyLogStep(), opts...) } } // ByNotifyLog orders the results by notify_log terms. func ByNotifyLog(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption { return func(s *sql.Selector) { sqlgraph.OrderByNeighborTerms(s, newNotifyLogStep(), append([]sql.OrderTerm{term}, terms...)...) } } func newAppStep() *sqlgraph.Step { return sqlgraph.NewStep( sqlgraph.From(Table, FieldID), sqlgraph.To(AppInverseTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, false, AppTable, AppColumn), ) } func newOrderStep() *sqlgraph.Step { return sqlgraph.NewStep( sqlgraph.From(Table, FieldID), sqlgraph.To(OrderInverseTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, false, OrderTable, OrderColumn), ) } func newNotifyLogStep() *sqlgraph.Step { return sqlgraph.NewStep( sqlgraph.From(Table, FieldID), sqlgraph.To(NotifyLogInverseTable, FieldID), sqlgraph.Edge(sqlgraph.O2M, true, NotifyLogTable, NotifyLogColumn), ) }