123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- package wpchatroommember
- import (
- "time"
- "entgo.io/ent/dialect/sql"
- )
- const (
-
- Label = "wp_chatroom_member"
-
- FieldID = "id"
-
- FieldCreatedAt = "created_at"
-
- FieldUpdatedAt = "updated_at"
-
- FieldStatus = "status"
-
- FieldWxWxid = "wx_wxid"
-
- FieldWxid = "wxid"
-
- FieldNickname = "nickname"
-
- FieldAvatar = "avatar"
-
- Table = "wp_chatroom_member"
- )
- var Columns = []string{
- FieldID,
- FieldCreatedAt,
- FieldUpdatedAt,
- FieldStatus,
- FieldWxWxid,
- FieldWxid,
- FieldNickname,
- FieldAvatar,
- }
- func ValidColumn(column string) bool {
- for i := range Columns {
- if column == Columns[i] {
- return true
- }
- }
- return false
- }
- var (
-
- DefaultCreatedAt func() time.Time
-
- DefaultUpdatedAt func() time.Time
-
- UpdateDefaultUpdatedAt func() time.Time
-
- DefaultStatus uint8
-
- DefaultWxWxid string
-
- DefaultWxid string
-
- DefaultNickname string
-
- DefaultAvatar string
- )
- 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 ByStatus(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldStatus, opts...).ToFunc()
- }
- func ByWxWxid(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldWxWxid, opts...).ToFunc()
- }
- func ByWxid(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldWxid, opts...).ToFunc()
- }
- func ByNickname(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldNickname, opts...).ToFunc()
- }
- func ByAvatar(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldAvatar, opts...).ToFunc()
- }
|