123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142 |
- // Code generated by ent, DO NOT EDIT.
- package addwechatfriendlog
- import (
- "entgo.io/ent/dialect/sql"
- )
- const (
- // Label holds the string label denoting the addwechatfriendlog type in the database.
- Label = "add_wechat_friend_log"
- // FieldID holds the string denoting the id field in the database.
- FieldID = "id"
- // FieldOwnerWxID holds the string denoting the owner_wx_id field in the database.
- FieldOwnerWxID = "owner_wx_id"
- // FieldOwnerWxType holds the string denoting the owner_wx_type field in the database.
- FieldOwnerWxType = "owner_wx_type"
- // FieldFindContent holds the string denoting the find_content field in the database.
- FieldFindContent = "find_content"
- // FieldMessage holds the string denoting the message field in the database.
- FieldMessage = "message"
- // FieldFindRequest holds the string denoting the find_request field in the database.
- FieldFindRequest = "find_request"
- // FieldFindResult holds the string denoting the find_result field in the database.
- FieldFindResult = "find_result"
- // FieldIsCanAdd holds the string denoting the is_can_add field in the database.
- FieldIsCanAdd = "is_can_add"
- // FieldTaskID holds the string denoting the task_id field in the database.
- FieldTaskID = "task_id"
- // FieldAddRequest holds the string denoting the add_request field in the database.
- FieldAddRequest = "add_request"
- // FieldAddResult holds the string denoting the add_result field in the database.
- FieldAddResult = "add_result"
- // 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"
- // Table holds the table name of the addwechatfriendlog in the database.
- Table = "add_wechat_friend_logs"
- )
- // Columns holds all SQL columns for addwechatfriendlog fields.
- var Columns = []string{
- FieldID,
- FieldOwnerWxID,
- FieldOwnerWxType,
- FieldFindContent,
- FieldMessage,
- FieldFindRequest,
- FieldFindResult,
- FieldIsCanAdd,
- FieldTaskID,
- FieldAddRequest,
- FieldAddResult,
- FieldCreatedAt,
- FieldUpdatedAt,
- }
- // 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 (
- // DefaultOwnerWxID holds the default value on creation for the "owner_wx_id" field.
- DefaultOwnerWxID string
- // OwnerWxIDValidator is a validator for the "owner_wx_id" field. It is called by the builders before save.
- OwnerWxIDValidator func(string) error
- // DefaultOwnerWxType holds the default value on creation for the "owner_wx_type" field.
- DefaultOwnerWxType int
- // DefaultFindContent holds the default value on creation for the "find_content" field.
- DefaultFindContent string
- // FindContentValidator is a validator for the "find_content" field. It is called by the builders before save.
- FindContentValidator func(string) error
- // DefaultMessage holds the default value on creation for the "message" field.
- DefaultMessage string
- // MessageValidator is a validator for the "message" field. It is called by the builders before save.
- MessageValidator func(string) error
- // DefaultIsCanAdd holds the default value on creation for the "is_can_add" field.
- DefaultIsCanAdd int
- // DefaultTaskID holds the default value on creation for the "task_id" field.
- DefaultTaskID int64
- // DefaultCreatedAt holds the default value on creation for the "created_at" field.
- DefaultCreatedAt func() int64
- // DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
- DefaultUpdatedAt func() int64
- // UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field.
- UpdateDefaultUpdatedAt func() int64
- )
- // OrderOption defines the ordering options for the AddWechatFriendLog 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()
- }
- // ByOwnerWxID orders the results by the owner_wx_id field.
- func ByOwnerWxID(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldOwnerWxID, opts...).ToFunc()
- }
- // ByOwnerWxType orders the results by the owner_wx_type field.
- func ByOwnerWxType(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldOwnerWxType, opts...).ToFunc()
- }
- // ByFindContent orders the results by the find_content field.
- func ByFindContent(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldFindContent, opts...).ToFunc()
- }
- // ByMessage orders the results by the message field.
- func ByMessage(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldMessage, opts...).ToFunc()
- }
- // ByIsCanAdd orders the results by the is_can_add field.
- func ByIsCanAdd(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldIsCanAdd, opts...).ToFunc()
- }
- // ByTaskID orders the results by the task_id field.
- func ByTaskID(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldTaskID, 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()
- }
|