123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182 |
- package wxcarduser
- import (
- "time"
- "entgo.io/ent"
- "entgo.io/ent/dialect/sql"
- )
- const (
-
- Label = "wx_card_user"
-
- FieldID = "id"
-
- FieldCreatedAt = "created_at"
-
- FieldUpdatedAt = "updated_at"
-
- FieldDeletedAt = "deleted_at"
-
- FieldWxid = "wxid"
-
- FieldAccount = "account"
-
- FieldAvatar = "avatar"
-
- FieldNickname = "nickname"
-
- FieldRemark = "remark"
-
- FieldPhone = "phone"
-
- FieldOpenID = "open_id"
-
- FieldUnionID = "union_id"
-
- FieldSessionKey = "session_key"
-
- FieldIsVip = "is_vip"
-
- Table = "wx_card_user"
- )
- var Columns = []string{
- FieldID,
- FieldCreatedAt,
- FieldUpdatedAt,
- FieldDeletedAt,
- FieldWxid,
- FieldAccount,
- FieldAvatar,
- FieldNickname,
- FieldRemark,
- FieldPhone,
- FieldOpenID,
- FieldUnionID,
- FieldSessionKey,
- FieldIsVip,
- }
- func ValidColumn(column string) bool {
- for i := range Columns {
- if column == Columns[i] {
- return true
- }
- }
- return false
- }
- var (
- Hooks [1]ent.Hook
- Interceptors [1]ent.Interceptor
-
- DefaultCreatedAt func() time.Time
-
- DefaultUpdatedAt func() time.Time
-
- UpdateDefaultUpdatedAt func() time.Time
-
- DefaultWxid string
-
- DefaultAccount string
-
- DefaultAvatar string
-
- DefaultNickname string
-
- DefaultRemark string
-
- DefaultPhone string
-
- DefaultOpenID string
-
- DefaultUnionID string
-
- DefaultSessionKey string
-
- DefaultIsVip int
- )
- type OrderOption func(*sql.Selector)
- func ByID(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldID, opts...).ToFunc()
- }
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
- }
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldUpdatedAt, opts...).ToFunc()
- }
- func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldDeletedAt, opts...).ToFunc()
- }
- func ByWxid(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldWxid, opts...).ToFunc()
- }
- func ByAccount(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldAccount, opts...).ToFunc()
- }
- func ByAvatar(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldAvatar, opts...).ToFunc()
- }
- func ByNickname(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldNickname, opts...).ToFunc()
- }
- func ByRemark(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldRemark, opts...).ToFunc()
- }
- func ByPhone(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldPhone, opts...).ToFunc()
- }
- func ByOpenID(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldOpenID, opts...).ToFunc()
- }
- func ByUnionID(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldUnionID, opts...).ToFunc()
- }
- func BySessionKey(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldSessionKey, opts...).ToFunc()
- }
- func ByIsVip(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldIsVip, opts...).ToFunc()
- }
|