// Code generated by ent, DO NOT EDIT. package wpchatroom import ( "time" "entgo.io/ent/dialect/sql" ) const ( // Label holds the string label denoting the wpchatroom type in the database. Label = "wp_chatroom" // 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" // FieldChatroomID holds the string denoting the chatroom_id field in the database. FieldChatroomID = "chatroom_id" // FieldNickname holds the string denoting the nickname field in the database. FieldNickname = "nickname" // FieldOwner holds the string denoting the owner field in the database. FieldOwner = "owner" // FieldAvatar holds the string denoting the avatar field in the database. FieldAvatar = "avatar" // FieldMemberList holds the string denoting the member_list field in the database. FieldMemberList = "member_list" // Table holds the table name of the wpchatroom in the database. Table = "wp_chatroom" ) // Columns holds all SQL columns for wpchatroom fields. var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldStatus, FieldWxWxid, FieldChatroomID, FieldNickname, FieldOwner, FieldAvatar, FieldMemberList, } // 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 // DefaultChatroomID holds the default value on creation for the "chatroom_id" field. DefaultChatroomID string // DefaultNickname holds the default value on creation for the "nickname" field. DefaultNickname string // DefaultOwner holds the default value on creation for the "owner" field. DefaultOwner string // DefaultAvatar holds the default value on creation for the "avatar" field. DefaultAvatar string ) // OrderOption defines the ordering options for the WpChatroom 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() } // ByChatroomID orders the results by the chatroom_id field. func ByChatroomID(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldChatroomID, opts...).ToFunc() } // ByNickname orders the results by the nickname field. func ByNickname(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldNickname, opts...).ToFunc() } // ByOwner orders the results by the owner field. func ByOwner(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldOwner, opts...).ToFunc() } // ByAvatar orders the results by the avatar field. func ByAvatar(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldAvatar, opts...).ToFunc() }