// Code generated by ent, DO NOT EDIT. package wpchatroommember import ( "time" "entgo.io/ent/dialect/sql" ) const ( // Label holds the string label denoting the wpchatroommember type in the database. Label = "wp_chatroom_member" // 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" // FieldWxWxid holds the string denoting the wx_wxid field in the database. FieldWxWxid = "wx_wxid" // FieldWxid holds the string denoting the wxid field in the database. FieldWxid = "wxid" // FieldNickname holds the string denoting the nickname field in the database. FieldNickname = "nickname" // FieldAvatar holds the string denoting the avatar field in the database. FieldAvatar = "avatar" // Table holds the table name of the wpchatroommember in the database. Table = "wp_chatroom_member" ) // Columns holds all SQL columns for wpchatroommember fields. var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldStatus, FieldWxWxid, FieldWxid, FieldNickname, FieldAvatar, } // 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 // DefaultStatus holds the default value on creation for the "status" field. DefaultStatus uint8 // DefaultWxWxid holds the default value on creation for the "wx_wxid" field. DefaultWxWxid string // DefaultWxid holds the default value on creation for the "wxid" field. DefaultWxid string // DefaultNickname holds the default value on creation for the "nickname" field. DefaultNickname string // DefaultAvatar holds the default value on creation for the "avatar" field. DefaultAvatar string ) // OrderOption defines the ordering options for the WpChatroomMember 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() } // ByWxWxid orders the results by the wx_wxid field. func ByWxWxid(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldWxWxid, opts...).ToFunc() } // ByWxid orders the results by the wxid field. func ByWxid(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldWxid, opts...).ToFunc() } // ByNickname orders the results by the nickname field. func ByNickname(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldNickname, opts...).ToFunc() } // ByAvatar orders the results by the avatar field. func ByAvatar(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldAvatar, opts...).ToFunc() }