123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191 |
- // Code generated by ent, DO NOT EDIT.
- package usagestatisticmonth
- import (
- "time"
- "entgo.io/ent"
- "entgo.io/ent/dialect/sql"
- )
- const (
- // Label holds the string label denoting the usagestatisticmonth type in the database.
- Label = "usage_statistic_month"
- // 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"
- // FieldDeletedAt holds the string denoting the deleted_at field in the database.
- FieldDeletedAt = "deleted_at"
- // FieldAddtime holds the string denoting the addtime field in the database.
- FieldAddtime = "addtime"
- // FieldType holds the string denoting the type field in the database.
- FieldType = "type"
- // FieldBotID holds the string denoting the bot_id field in the database.
- FieldBotID = "bot_id"
- // FieldOrganizationID holds the string denoting the organization_id field in the database.
- FieldOrganizationID = "organization_id"
- // FieldAiResponse holds the string denoting the ai_response field in the database.
- FieldAiResponse = "ai_response"
- // FieldSopRun holds the string denoting the sop_run field in the database.
- FieldSopRun = "sop_run"
- // FieldTotalFriend holds the string denoting the total_friend field in the database.
- FieldTotalFriend = "total_friend"
- // FieldTotalGroup holds the string denoting the total_group field in the database.
- FieldTotalGroup = "total_group"
- // FieldAccountBalance holds the string denoting the account_balance field in the database.
- FieldAccountBalance = "account_balance"
- // FieldConsumeToken holds the string denoting the consume_token field in the database.
- FieldConsumeToken = "consume_token"
- // FieldActiveUser holds the string denoting the active_user field in the database.
- FieldActiveUser = "active_user"
- // FieldNewUser holds the string denoting the new_user field in the database.
- FieldNewUser = "new_user"
- // FieldLabelDist holds the string denoting the label_dist field in the database.
- FieldLabelDist = "label_dist"
- // Table holds the table name of the usagestatisticmonth in the database.
- Table = "usage_statistic_month"
- )
- // Columns holds all SQL columns for usagestatisticmonth fields.
- var Columns = []string{
- FieldID,
- FieldCreatedAt,
- FieldUpdatedAt,
- FieldStatus,
- FieldDeletedAt,
- FieldAddtime,
- FieldType,
- FieldBotID,
- FieldOrganizationID,
- FieldAiResponse,
- FieldSopRun,
- FieldTotalFriend,
- FieldTotalGroup,
- FieldAccountBalance,
- FieldConsumeToken,
- FieldActiveUser,
- FieldNewUser,
- FieldLabelDist,
- }
- // 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
- }
- // Note that the variables below are initialized by the runtime
- // package on the initialization of the application. Therefore,
- // it should be imported in the main as follows:
- //
- // import _ "wechat-api/ent/runtime"
- var (
- Hooks [1]ent.Hook
- Interceptors [1]ent.Interceptor
- // 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
- )
- // OrderOption defines the ordering options for the UsageStatisticMonth 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()
- }
- // ByDeletedAt orders the results by the deleted_at field.
- func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldDeletedAt, opts...).ToFunc()
- }
- // ByAddtime orders the results by the addtime field.
- func ByAddtime(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldAddtime, opts...).ToFunc()
- }
- // ByType orders the results by the type field.
- func ByType(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldType, opts...).ToFunc()
- }
- // ByBotID orders the results by the bot_id field.
- func ByBotID(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldBotID, opts...).ToFunc()
- }
- // ByOrganizationID orders the results by the organization_id field.
- func ByOrganizationID(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldOrganizationID, opts...).ToFunc()
- }
- // ByAiResponse orders the results by the ai_response field.
- func ByAiResponse(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldAiResponse, opts...).ToFunc()
- }
- // BySopRun orders the results by the sop_run field.
- func BySopRun(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldSopRun, opts...).ToFunc()
- }
- // ByTotalFriend orders the results by the total_friend field.
- func ByTotalFriend(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldTotalFriend, opts...).ToFunc()
- }
- // ByTotalGroup orders the results by the total_group field.
- func ByTotalGroup(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldTotalGroup, opts...).ToFunc()
- }
- // ByAccountBalance orders the results by the account_balance field.
- func ByAccountBalance(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldAccountBalance, opts...).ToFunc()
- }
- // ByConsumeToken orders the results by the consume_token field.
- func ByConsumeToken(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldConsumeToken, opts...).ToFunc()
- }
- // ByActiveUser orders the results by the active_user field.
- func ByActiveUser(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldActiveUser, opts...).ToFunc()
- }
- // ByNewUser orders the results by the new_user field.
- func ByNewUser(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldNewUser, opts...).ToFunc()
- }
|