123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172 |
- // Code generated by ent, DO NOT EDIT.
- package whatsappchannel
- import (
- "time"
- "entgo.io/ent"
- "entgo.io/ent/dialect/sql"
- )
- const (
- // Label holds the string label denoting the whatsappchannel type in the database.
- Label = "whatsapp_channel"
- // 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"
- // FieldAk holds the string denoting the ak field in the database.
- FieldAk = "ak"
- // FieldSk holds the string denoting the sk field in the database.
- FieldSk = "sk"
- // FieldWaID holds the string denoting the wa_id field in the database.
- FieldWaID = "wa_id"
- // FieldWaName holds the string denoting the wa_name field in the database.
- FieldWaName = "wa_name"
- // FieldWabaID holds the string denoting the waba_id field in the database.
- FieldWabaID = "waba_id"
- // FieldBusinessID holds the string denoting the business_id field in the database.
- FieldBusinessID = "business_id"
- // FieldOrganizationID holds the string denoting the organization_id field in the database.
- FieldOrganizationID = "organization_id"
- // FieldVerifyAccount holds the string denoting the verify_account field in the database.
- FieldVerifyAccount = "verify_account"
- // Table holds the table name of the whatsappchannel in the database.
- Table = "whatsapp_channel"
- )
- // Columns holds all SQL columns for whatsappchannel fields.
- var Columns = []string{
- FieldID,
- FieldCreatedAt,
- FieldUpdatedAt,
- FieldStatus,
- FieldDeletedAt,
- FieldAk,
- FieldSk,
- FieldWaID,
- FieldWaName,
- FieldWabaID,
- FieldBusinessID,
- FieldOrganizationID,
- FieldVerifyAccount,
- }
- // 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
- // DefaultAk holds the default value on creation for the "ak" field.
- DefaultAk string
- // DefaultSk holds the default value on creation for the "sk" field.
- DefaultSk string
- // DefaultWaID holds the default value on creation for the "wa_id" field.
- DefaultWaID string
- // DefaultWaName holds the default value on creation for the "wa_name" field.
- DefaultWaName string
- // DefaultWabaID holds the default value on creation for the "waba_id" field.
- DefaultWabaID uint64
- // DefaultBusinessID holds the default value on creation for the "business_id" field.
- DefaultBusinessID uint64
- // DefaultOrganizationID holds the default value on creation for the "organization_id" field.
- DefaultOrganizationID uint64
- // DefaultVerifyAccount holds the default value on creation for the "verify_account" field.
- DefaultVerifyAccount string
- )
- // OrderOption defines the ordering options for the WhatsappChannel 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()
- }
- // ByAk orders the results by the ak field.
- func ByAk(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldAk, opts...).ToFunc()
- }
- // BySk orders the results by the sk field.
- func BySk(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldSk, opts...).ToFunc()
- }
- // ByWaID orders the results by the wa_id field.
- func ByWaID(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldWaID, opts...).ToFunc()
- }
- // ByWaName orders the results by the wa_name field.
- func ByWaName(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldWaName, opts...).ToFunc()
- }
- // ByWabaID orders the results by the waba_id field.
- func ByWabaID(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldWabaID, opts...).ToFunc()
- }
- // ByBusinessID orders the results by the business_id field.
- func ByBusinessID(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldBusinessID, opts...).ToFunc()
- }
- // ByOrganizationID orders the results by the organization_id field.
- func ByOrganizationID(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldOrganizationID, opts...).ToFunc()
- }
- // ByVerifyAccount orders the results by the verify_account field.
- func ByVerifyAccount(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldVerifyAccount, opts...).ToFunc()
- }
|