// Code generated by ent, DO NOT EDIT. package paynotifylog import ( "time" "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" ) const ( // Label holds the string label denoting the paynotifylog type in the database. Label = "pay_notify_log" // 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" // FieldTaskID holds the string denoting the task_id field in the database. FieldTaskID = "task_id" // FieldNotifyCount holds the string denoting the notify_count field in the database. FieldNotifyCount = "notify_count" // FieldResponse holds the string denoting the response field in the database. FieldResponse = "response" // FieldNotifyStatus holds the string denoting the notify_status field in the database. FieldNotifyStatus = "notify_status" // EdgeTask holds the string denoting the task edge name in mutations. EdgeTask = "task" // Table holds the table name of the paynotifylog in the database. Table = "pay_notify_log" // TaskTable is the table that holds the task relation/edge. TaskTable = "pay_notify_log" // TaskInverseTable is the table name for the PayNotifyTask entity. // It exists in this package in order to avoid circular dependency with the "paynotifytask" package. TaskInverseTable = "pay_notify_task" // TaskColumn is the table column denoting the task relation/edge. TaskColumn = "task_id" ) // Columns holds all SQL columns for paynotifylog fields. var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldStatus, FieldTenantID, FieldDeletedAt, FieldTaskID, FieldNotifyCount, FieldResponse, FieldNotifyStatus, } // 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 // DefaultNotifyCount holds the default value on creation for the "notify_count" field. DefaultNotifyCount uint32 ) // OrderOption defines the ordering options for the PayNotifyLog 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() } // ByTaskID orders the results by the task_id field. func ByTaskID(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldTaskID, opts...).ToFunc() } // ByNotifyCount orders the results by the notify_count field. func ByNotifyCount(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldNotifyCount, opts...).ToFunc() } // ByResponse orders the results by the response field. func ByResponse(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldResponse, opts...).ToFunc() } // ByNotifyStatus orders the results by the notify_status field. func ByNotifyStatus(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldNotifyStatus, opts...).ToFunc() } // ByTaskField orders the results by task field. func ByTaskField(field string, opts ...sql.OrderTermOption) OrderOption { return func(s *sql.Selector) { sqlgraph.OrderByNeighborTerms(s, newTaskStep(), sql.OrderByField(field, opts...)) } } func newTaskStep() *sqlgraph.Step { return sqlgraph.NewStep( sqlgraph.From(Table, FieldID), sqlgraph.To(TaskInverseTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, false, TaskTable, TaskColumn), ) }