// Code generated by ent, DO NOT EDIT. package sorausagestat import ( "time" "entgo.io/ent/dialect/sql" ) const ( // Label holds the string label denoting the sorausagestat type in the database. Label = "sora_usage_stat" // 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" // FieldAccountID holds the string denoting the account_id field in the database. FieldAccountID = "account_id" // FieldImageCount holds the string denoting the image_count field in the database. FieldImageCount = "image_count" // FieldVideoCount holds the string denoting the video_count field in the database. FieldVideoCount = "video_count" // FieldErrorCount holds the string denoting the error_count field in the database. FieldErrorCount = "error_count" // FieldLastErrorAt holds the string denoting the last_error_at field in the database. FieldLastErrorAt = "last_error_at" // FieldTodayImageCount holds the string denoting the today_image_count field in the database. FieldTodayImageCount = "today_image_count" // FieldTodayVideoCount holds the string denoting the today_video_count field in the database. FieldTodayVideoCount = "today_video_count" // FieldTodayErrorCount holds the string denoting the today_error_count field in the database. FieldTodayErrorCount = "today_error_count" // FieldTodayDate holds the string denoting the today_date field in the database. FieldTodayDate = "today_date" // FieldConsecutiveErrorCount holds the string denoting the consecutive_error_count field in the database. FieldConsecutiveErrorCount = "consecutive_error_count" // Table holds the table name of the sorausagestat in the database. Table = "sora_usage_stats" ) // Columns holds all SQL columns for sorausagestat fields. var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldAccountID, FieldImageCount, FieldVideoCount, FieldErrorCount, FieldLastErrorAt, FieldTodayImageCount, FieldTodayVideoCount, FieldTodayErrorCount, FieldTodayDate, FieldConsecutiveErrorCount, } // 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 // DefaultImageCount holds the default value on creation for the "image_count" field. DefaultImageCount int // DefaultVideoCount holds the default value on creation for the "video_count" field. DefaultVideoCount int // DefaultErrorCount holds the default value on creation for the "error_count" field. DefaultErrorCount int // DefaultTodayImageCount holds the default value on creation for the "today_image_count" field. DefaultTodayImageCount int // DefaultTodayVideoCount holds the default value on creation for the "today_video_count" field. DefaultTodayVideoCount int // DefaultTodayErrorCount holds the default value on creation for the "today_error_count" field. DefaultTodayErrorCount int // DefaultConsecutiveErrorCount holds the default value on creation for the "consecutive_error_count" field. DefaultConsecutiveErrorCount int ) // OrderOption defines the ordering options for the SoraUsageStat 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() } // ByAccountID orders the results by the account_id field. func ByAccountID(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldAccountID, opts...).ToFunc() } // ByImageCount orders the results by the image_count field. func ByImageCount(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldImageCount, opts...).ToFunc() } // ByVideoCount orders the results by the video_count field. func ByVideoCount(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldVideoCount, opts...).ToFunc() } // ByErrorCount orders the results by the error_count field. func ByErrorCount(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldErrorCount, opts...).ToFunc() } // ByLastErrorAt orders the results by the last_error_at field. func ByLastErrorAt(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldLastErrorAt, opts...).ToFunc() } // ByTodayImageCount orders the results by the today_image_count field. func ByTodayImageCount(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldTodayImageCount, opts...).ToFunc() } // ByTodayVideoCount orders the results by the today_video_count field. func ByTodayVideoCount(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldTodayVideoCount, opts...).ToFunc() } // ByTodayErrorCount orders the results by the today_error_count field. func ByTodayErrorCount(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldTodayErrorCount, opts...).ToFunc() } // ByTodayDate orders the results by the today_date field. func ByTodayDate(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldTodayDate, opts...).ToFunc() } // ByConsecutiveErrorCount orders the results by the consecutive_error_count field. func ByConsecutiveErrorCount(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldConsecutiveErrorCount, opts...).ToFunc() }