// Code generated by ent, DO NOT EDIT. package compapijob import ( "time" "entgo.io/ent/dialect/sql" ) const ( // Label holds the string label denoting the compapijob type in the database. Label = "compapi_job" // 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" // FieldDistAt holds the string denoting the dist_at field in the database. FieldDistAt = "dist_at" // FieldDistStatus holds the string denoting the dist_status field in the database. FieldDistStatus = "dist_status" // FieldCallbackStatus holds the string denoting the callback_status field in the database. FieldCallbackStatus = "callback_status" // FieldCallbackURL holds the string denoting the callback_url field in the database. FieldCallbackURL = "callback_url" // FieldRequestJSON holds the string denoting the request_json field in the database. FieldRequestJSON = "request_json" // FieldAuthToken holds the string denoting the auth_token field in the database. FieldAuthToken = "auth_token" // FieldEventType holds the string denoting the event_type field in the database. FieldEventType = "event_type" // FieldWorkidIdx holds the string denoting the workid_idx field in the database. FieldWorkidIdx = "workid_idx" // FieldChatID holds the string denoting the chat_id field in the database. FieldChatID = "chat_id" // FieldRetryCount holds the string denoting the retry_count field in the database. FieldRetryCount = "retry_count" // Table holds the table name of the compapijob in the database. Table = "compapi_job" ) // Columns holds all SQL columns for compapijob fields. var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldDistAt, FieldDistStatus, FieldCallbackStatus, FieldCallbackURL, FieldRequestJSON, FieldAuthToken, FieldEventType, FieldWorkidIdx, FieldChatID, FieldRetryCount, } // 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 // DefaultDistStatus holds the default value on creation for the "dist_status" field. DefaultDistStatus int8 // DefaultCallbackStatus holds the default value on creation for the "callback_status" field. DefaultCallbackStatus int8 // DefaultAuthToken holds the default value on creation for the "auth_token" field. DefaultAuthToken string // DefaultEventType holds the default value on creation for the "event_type" field. DefaultEventType string // DefaultWorkidIdx holds the default value on creation for the "workid_idx" field. DefaultWorkidIdx int8 // DefaultChatID holds the default value on creation for the "chat_id" field. DefaultChatID string // DefaultRetryCount holds the default value on creation for the "retry_count" field. DefaultRetryCount int8 ) // OrderOption defines the ordering options for the CompapiJob 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() } // ByDistAt orders the results by the dist_at field. func ByDistAt(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldDistAt, opts...).ToFunc() } // ByDistStatus orders the results by the dist_status field. func ByDistStatus(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldDistStatus, opts...).ToFunc() } // ByCallbackStatus orders the results by the callback_status field. func ByCallbackStatus(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldCallbackStatus, opts...).ToFunc() } // ByCallbackURL orders the results by the callback_url field. func ByCallbackURL(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldCallbackURL, opts...).ToFunc() } // ByAuthToken orders the results by the auth_token field. func ByAuthToken(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldAuthToken, opts...).ToFunc() } // ByEventType orders the results by the event_type field. func ByEventType(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldEventType, opts...).ToFunc() } // ByWorkidIdx orders the results by the workid_idx field. func ByWorkidIdx(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldWorkidIdx, opts...).ToFunc() } // ByChatID orders the results by the chat_id field. func ByChatID(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldChatID, opts...).ToFunc() } // ByRetryCount orders the results by the retry_count field. func ByRetryCount(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldRetryCount, opts...).ToFunc() }