Documentation ¶
Overview ¶
travel 数据模型包 编写 规范,纯数据 结构 struct + 对应数据结构 Model 包括 :
用户模型 User, UserModel (注册用户) 游记模型 TravelNotes , PostModel (记录用户发布的游记) 附件模型 Attachment ,AttachmentModel (系统文件保存记录)
Index ¶
- Constants
- Variables
- func AppendQueryPostsCodesWithKey(query map[string]interface{}, codes []string, key string) map[string]interface{}
- func AppendQueryTypes(query map[string]interface{}, codes []string) map[string]interface{}
- func AppendQueryTypesWithKey(query map[string]interface{}, codes []string, key string) map[string]interface{}
- func ArrayFirst(arr []interface{}) interface{}
- func GenderText(gender int) string
- func GetAttachTypes(ty string) []string
- func GetDate() int64
- func GetDfaInstance() *dfaLogic
- func GetGenderEnum(gender string) int
- func GetGenderKey(gender int) string
- func GetLevelByDesc(desc string) int
- func GetLevelDesc(level int) string
- func GetLevelText(level int) string
- func GetModelProfiles() *map[string]interface{}
- func GetPostCodesMap() map[uint]string
- func GetPostTypesMap() map[string]uint
- func GetProfile(key string, defaults ...interface{}) interface{}
- func GetStateDesc(state int) string
- func GetTypeCode(typ int) string
- func GetTypeDesc(typ int) string
- func GetTypeId(typ string) int
- func GetTypeIdByDesc(desc string) int
- func GetUserBackgroundUrl(id string, ty string) string
- func GetUserCommentNumber(userId string) int64
- func GetUserDownPostNumber(userId string) int64
- func GetUserFansNumber(userId string) int64
- func GetUserFollowNumber(userId string) int64
- func GetUserLikeNumber(userId string) int64
- func GetUserNotPassPostNumber(userId string) int64
- func GetUserPassPostNumber(userId string) int64
- func GetUserPostNumber(userId string) int64
- func GetUserPostTotal(userId string) int64
- func GetUserThumbsUpNumber(userId string) int64
- func InSupportLevel(level int) bool
- func IncludesPostTypes(t uint) bool
- func IsDuplicate(err error) bool
- func IsEmpty(v interface{}) bool
- func IsErrCursor(err error) bool
- func IsForbid(data *User) bool
- func IsNotFound(err error) bool
- func IsNumber(v interface{}) bool
- func Merger(m beego.M, m2 beego.M) beego.M
- func ParsePostTypesByCodes(codes []string) []uint
- func SetProfile(key string, v interface{})
- type Address
- func (this *Address) AddExcludeKeys(key ...string)
- func (this *Address) AddFilters(filters ...func(m beego.M) beego.M)
- func (this *Address) Defaults() *Address
- func (this *Address) Excludes(key string) bool
- func (this *Address) Foreach(each func(k string, v interface{}) bool)
- func (this *Address) GetFormatterTime(key string) func(data beego.M) beego.M
- func (this *Address) GetId() bson.ObjectId
- func (this *Address) GetKeysFilter(keys []string, excludes ...bool) func(data beego.M) beego.M
- func (this *Address) GetNow() time.Time
- func (this *Address) GetTransformFilter(transform func(key string, v interface{}, data *beego.M)) func(data beego.M) beego.M
- func (this *Address) GetTransformFilterByKey(key string, trans func(v interface{}) interface{}) func(data beego.M) beego.M
- func (this *Address) Init()
- func (this *Address) InitDefault()
- func (this *Address) IsEmpty(v interface{}) bool
- func (this *Address) Keys() []string
- func (this *Address) Load(data map[string]interface{}) *Address
- func (this *Address) M(filter ...func(m beego.M) beego.M) beego.M
- func (this *Address) Map(each func(k string, v interface{}, result interface{}) interface{}, ...) interface{}
- func (this *Address) Merger(m beego.M, m2 beego.M) beego.M
- func (this *Address) RemoveExcludeKeys(key ...string)
- func (this *Address) Save() error
- func (this *Address) Set(key string, v interface{}) *Address
- func (this *Address) SetAttributes(m map[string]interface{}, safe ...bool)
- func (this *Address) SetBool(value *bool, v interface{}) bool
- func (this *Address) SetBsonMapper(tObj *bson.M, v interface{}, force ...bool) bool
- func (this *Address) SetMap(tObj *map[string]interface{}, v interface{}, force ...bool) bool
- func (this *Address) SetMapper(tObj *beego.M, v interface{}, force ...bool) bool
- func (this *Address) SetNumInt(num *int, v interface{}) bool
- func (this *Address) SetNumIntN(num *int64, v interface{}) bool
- func (this *Address) SetObjectId(objId *bson.ObjectId, v interface{}) bool
- func (this *Address) SetProvider(name string, v interface{})
- func (this *Address) SetSameTypeValue(obj interface{}, v interface{}) bool
- func (this *Address) SetString(str *string, v interface{}) bool
- func (this *Address) SetStringArr(arr *[]string, v interface{}) bool
- func (this *Address) SetTime(tObj *time.Time, v interface{}, force ...bool) bool
- func (this *Address) Values() []interface{}
- type AddressInfo
- type AddressModel
- type AppBaseConfig
- func (this *AppBaseConfig) AddExcludeKeys(key ...string)
- func (this *AppBaseConfig) AddFilters(filters ...func(m beego.M) beego.M)
- func (this *AppBaseConfig) Excludes(key string) bool
- func (this *AppBaseConfig) Foreach(each func(k string, v interface{}) bool)
- func (this *AppBaseConfig) GetAppAboutUs(drivers ...string) string
- func (this *AppBaseConfig) GetAppCode(drivers ...string) string
- func (this *AppBaseConfig) GetAppPrivacy(drivers ...string) string
- func (this *AppBaseConfig) GetAppUserAgreement(drivers ...string) string
- func (this *AppBaseConfig) GetDownloadUrl(drivers ...string) string
- func (this *AppBaseConfig) GetFormatterTime(key string) func(data beego.M) beego.M
- func (this *AppBaseConfig) GetHelpUrl(drivers ...string) string
- func (this *AppBaseConfig) GetId() bson.ObjectId
- func (this *AppBaseConfig) GetKeysFilter(keys []string, excludes ...bool) func(data beego.M) beego.M
- func (this *AppBaseConfig) GetMail(drivers ...string) string
- func (this *AppBaseConfig) GetNow() time.Time
- func (this *AppBaseConfig) GetQQ(drivers ...string) string
- func (this *AppBaseConfig) GetTransformFilter(transform func(key string, v interface{}, data *beego.M)) func(data beego.M) beego.M
- func (this *AppBaseConfig) GetTransformFilterByKey(key string, trans func(v interface{}) interface{}) func(data beego.M) beego.M
- func (this *AppBaseConfig) GetWeChat(drivers ...string) string
- func (this *AppBaseConfig) Init()
- func (this *AppBaseConfig) InitDefault()
- func (this *AppBaseConfig) IsEmpty(v interface{}) bool
- func (this *AppBaseConfig) Keys() []string
- func (this *AppBaseConfig) Load(driver ...string) *AppBaseConfig
- func (this *AppBaseConfig) M(filter ...func(m beego.M) beego.M) beego.M
- func (this *AppBaseConfig) Map(each func(k string, v interface{}, result interface{}) interface{}, ...) interface{}
- func (this *AppBaseConfig) Merger(m beego.M, m2 beego.M) beego.M
- func (this *AppBaseConfig) RemoveExcludeKeys(key ...string)
- func (this *AppBaseConfig) Save() error
- func (this *AppBaseConfig) Set(key string, v interface{}) *AppBaseConfig
- func (this *AppBaseConfig) SetAttributes(m map[string]interface{}, safe ...bool)
- func (this *AppBaseConfig) SetBool(value *bool, v interface{}) bool
- func (this *AppBaseConfig) SetBsonMapper(tObj *bson.M, v interface{}, force ...bool) bool
- func (this *AppBaseConfig) SetMap(tObj *map[string]interface{}, v interface{}, force ...bool) bool
- func (this *AppBaseConfig) SetMapper(tObj *beego.M, v interface{}, force ...bool) bool
- func (this *AppBaseConfig) SetNumInt(num *int, v interface{}) bool
- func (this *AppBaseConfig) SetNumIntN(num *int64, v interface{}) bool
- func (this *AppBaseConfig) SetObjectId(objId *bson.ObjectId, v interface{}) bool
- func (this *AppBaseConfig) SetProvider(name string, v interface{})
- func (this *AppBaseConfig) SetSameTypeValue(obj interface{}, v interface{}) bool
- func (this *AppBaseConfig) SetString(str *string, v interface{}) bool
- func (this *AppBaseConfig) SetStringArr(arr *[]string, v interface{}) bool
- func (this *AppBaseConfig) SetTime(tObj *time.Time, v interface{}, force ...bool) bool
- func (this *AppBaseConfig) Values() []interface{}
- type AppInfo
- func (this *AppInfo) AddExcludeKeys(key ...string)
- func (this *AppInfo) AddFilters(filters ...func(m beego.M) beego.M)
- func (this *AppInfo) Excludes(key string) bool
- func (this *AppInfo) Foreach(each func(k string, v interface{}) bool)
- func (this *AppInfo) GetAppBuild() int
- func (this *AppInfo) GetAppName() string
- func (this *AppInfo) GetDownloadUrl() string
- func (this *AppInfo) GetFormatterTime(key string) func(data beego.M) beego.M
- func (this *AppInfo) GetId() bson.ObjectId
- func (this *AppInfo) GetKeysFilter(keys []string, excludes ...bool) func(data beego.M) beego.M
- func (this *AppInfo) GetNow() time.Time
- func (this *AppInfo) GetTransformFilter(transform func(key string, v interface{}, data *beego.M)) func(data beego.M) beego.M
- func (this *AppInfo) GetTransformFilterByKey(key string, trans func(v interface{}) interface{}) func(data beego.M) beego.M
- func (this *AppInfo) Init()
- func (this *AppInfo) InitDefault()
- func (this *AppInfo) IsEmpty(v interface{}) bool
- func (this *AppInfo) Keys() []string
- func (this *AppInfo) M(filter ...func(m beego.M) beego.M) beego.M
- func (this *AppInfo) Map(each func(k string, v interface{}, result interface{}) interface{}, ...) interface{}
- func (this *AppInfo) Merger(m beego.M, m2 beego.M) beego.M
- func (this *AppInfo) RemoveExcludeKeys(key ...string)
- func (this *AppInfo) Save() error
- func (this *AppInfo) Set(key string, v interface{}) *AppInfo
- func (this *AppInfo) SetAttributes(m map[string]interface{}, safe ...bool)
- func (this *AppInfo) SetBool(value *bool, v interface{}) bool
- func (this *AppInfo) SetBsonMapper(tObj *bson.M, v interface{}, force ...bool) bool
- func (this *AppInfo) SetMap(tObj *map[string]interface{}, v interface{}, force ...bool) bool
- func (this *AppInfo) SetMapper(tObj *beego.M, v interface{}, force ...bool) bool
- func (this *AppInfo) SetNumInt(num *int, v interface{}) bool
- func (this *AppInfo) SetNumIntN(num *int64, v interface{}) bool
- func (this *AppInfo) SetObjectId(objId *bson.ObjectId, v interface{}) bool
- func (this *AppInfo) SetProvider(name string, v interface{})
- func (this *AppInfo) SetSameTypeValue(obj interface{}, v interface{}) bool
- func (this *AppInfo) SetString(str *string, v interface{}) bool
- func (this *AppInfo) SetStringArr(arr *[]string, v interface{}) bool
- func (this *AppInfo) SetTime(tObj *time.Time, v interface{}, force ...bool) bool
- func (this *AppInfo) Values() []interface{}
- type AppModel
- func (this *AppModel) Adds(items []map[string]interface{}) error
- func (this *AppModel) CreateIndex(force ...bool)
- func (this *AppModel) GetAppBuild(driver string) int
- func (this *AppModel) GetAppDownloadUrl(driver string) string
- func (this *AppModel) GetAppVersion(driver string) string
- func (this *AppModel) GetByUnique(data map[string]interface{}) *AppInfo
- func (this *AppModel) TableName() string
- type ApplyInfo
- func (this *ApplyInfo) AddExcludeKeys(key ...string)
- func (this *ApplyInfo) AddFilters(filters ...func(m beego.M) beego.M)
- func (this *ApplyInfo) AppendImages(images ...string) *ApplyInfo
- func (this *ApplyInfo) CheckType() bool
- func (this *ApplyInfo) Excludes(key string) bool
- func (this *ApplyInfo) Foreach(each func(k string, v interface{}) bool)
- func (this *ApplyInfo) GetFormatterTime(key string) func(data beego.M) beego.M
- func (this *ApplyInfo) GetId() bson.ObjectId
- func (this *ApplyInfo) GetKeysFilter(keys []string, excludes ...bool) func(data beego.M) beego.M
- func (this *ApplyInfo) GetNow() time.Time
- func (this *ApplyInfo) GetTransformFilter(transform func(key string, v interface{}, data *beego.M)) func(data beego.M) beego.M
- func (this *ApplyInfo) GetTransformFilterByKey(key string, trans func(v interface{}) interface{}) func(data beego.M) beego.M
- func (this *ApplyInfo) InitDefault()
- func (this *ApplyInfo) IsEmpty(v interface{}) bool
- func (this *ApplyInfo) Keys() []string
- func (this *ApplyInfo) M(filter ...func(m beego.M) beego.M) beego.M
- func (this *ApplyInfo) Map(each func(k string, v interface{}, result interface{}) interface{}, ...) interface{}
- func (this *ApplyInfo) Merger(m beego.M, m2 beego.M) beego.M
- func (this *ApplyInfo) RemoveExcludeKeys(key ...string)
- func (this *ApplyInfo) Save() error
- func (this *ApplyInfo) Set(key string, value interface{}) *ApplyInfo
- func (this *ApplyInfo) SetAttributes(m map[string]interface{}, safe ...bool)
- func (this *ApplyInfo) SetBool(value *bool, v interface{}) bool
- func (this *ApplyInfo) SetBsonMapper(tObj *bson.M, v interface{}, force ...bool) bool
- func (this *ApplyInfo) SetMap(tObj *map[string]interface{}, v interface{}, force ...bool) bool
- func (this *ApplyInfo) SetMapper(tObj *beego.M, v interface{}, force ...bool) bool
- func (this *ApplyInfo) SetNumInt(num *int, v interface{}) bool
- func (this *ApplyInfo) SetNumIntN(num *int64, v interface{}) bool
- func (this *ApplyInfo) SetObjectId(objId *bson.ObjectId, v interface{}) bool
- func (this *ApplyInfo) SetProvider(name string, v interface{})
- func (this *ApplyInfo) SetSameTypeValue(obj interface{}, v interface{}) bool
- func (this *ApplyInfo) SetString(str *string, v interface{}) bool
- func (this *ApplyInfo) SetStringArr(arr *[]string, v interface{}) bool
- func (this *ApplyInfo) SetTime(tObj *time.Time, v interface{}, force ...bool) bool
- func (this *ApplyInfo) Values() []interface{}
- type ApplyInfoModel
- type Attachment
- func (this *Attachment) AutoType() *Attachment
- func (this *Attachment) CertificateUrl(url string, expire ...int64) string
- func (this *Attachment) CheckType() bool
- func (this *Attachment) Defaults() *Attachment
- func (this *Attachment) GetBase(seps ...string) string
- func (this *Attachment) GetCoverInfo(id bson.ObjectId) *Attachment
- func (this *Attachment) GetLocal() string
- func (this *Attachment) GetUrl() string
- func (this *Attachment) Image() *Image
- func (this *Attachment) Load(data map[string]interface{}) *Attachment
- func (this *Attachment) M(filters ...func(m beego.M) beego.M) beego.M
- func (this *Attachment) Video() *Video
- type AttachmentModel
- func (this *AttachmentModel) CreateIndex(force ...bool)
- func (this *AttachmentModel) GetByMediaId(id string) (*Attachment, error)
- func (this *AttachmentModel) GetImageById(id string) *Image
- func (this *AttachmentModel) GetVideoById(id string) *Video
- func (this *AttachmentModel) ImageOk(id string) bool
- func (this *AttachmentModel) TableName() string
- func (this *AttachmentModel) TypeMediaOk(id string, ty string) bool
- func (this *AttachmentModel) VideoOk(id string) bool
- type AuditLog
- func (this *AuditLog) AddExcludeKeys(key ...string)
- func (this *AuditLog) AddFilters(filters ...func(m beego.M) beego.M)
- func (this *AuditLog) Excludes(key string) bool
- func (this *AuditLog) Foreach(each func(k string, v interface{}) bool)
- func (this *AuditLog) GetFormatterTime(key string) func(data beego.M) beego.M
- func (this *AuditLog) GetId() bson.ObjectId
- func (this *AuditLog) GetKeysFilter(keys []string, excludes ...bool) func(data beego.M) beego.M
- func (this *AuditLog) GetNow() time.Time
- func (this *AuditLog) GetTransformFilter(transform func(key string, v interface{}, data *beego.M)) func(data beego.M) beego.M
- func (this *AuditLog) GetTransformFilterByKey(key string, trans func(v interface{}) interface{}) func(data beego.M) beego.M
- func (this *AuditLog) Init()
- func (this *AuditLog) InitDefault()
- func (this *AuditLog) IsEmpty(v interface{}) bool
- func (this *AuditLog) Keys() []string
- func (this *AuditLog) M(filter ...func(m beego.M) beego.M) beego.M
- func (this *AuditLog) Map(each func(k string, v interface{}, result interface{}) interface{}, ...) interface{}
- func (this *AuditLog) Merger(m beego.M, m2 beego.M) beego.M
- func (this *AuditLog) RemoveExcludeKeys(key ...string)
- func (this *AuditLog) Save() error
- func (this *AuditLog) Set(key string, v interface{}) *AuditLog
- func (this *AuditLog) SetAttributes(m map[string]interface{}, safe ...bool)
- func (this *AuditLog) SetBool(value *bool, v interface{}) bool
- func (this *AuditLog) SetBsonMapper(tObj *bson.M, v interface{}, force ...bool) bool
- func (this *AuditLog) SetMap(tObj *map[string]interface{}, v interface{}, force ...bool) bool
- func (this *AuditLog) SetMapper(tObj *beego.M, v interface{}, force ...bool) bool
- func (this *AuditLog) SetNumInt(num *int, v interface{}) bool
- func (this *AuditLog) SetNumIntN(num *int64, v interface{}) bool
- func (this *AuditLog) SetObjectId(objId *bson.ObjectId, v interface{}) bool
- func (this *AuditLog) SetProvider(name string, v interface{})
- func (this *AuditLog) SetSameTypeValue(obj interface{}, v interface{}) bool
- func (this *AuditLog) SetString(str *string, v interface{}) bool
- func (this *AuditLog) SetStringArr(arr *[]string, v interface{}) bool
- func (this *AuditLog) SetTime(tObj *time.Time, v interface{}, force ...bool) bool
- func (this *AuditLog) Values() []interface{}
- type AuditLogModel
- type AuthModel
- type AvatarInfo
- type AwardWay
- type BaseModel
- func (this *BaseModel) Add(docs interface{}) error
- func (this *BaseModel) AddScopeQuery(m bson.M)
- func (this *BaseModel) All(query interface{}, result interface{}, selects ...interface{}) error
- func (this *BaseModel) Bind(v interface{}) Model
- func (this *BaseModel) Collection(doc ...string) *mgo.Collection
- func (this *BaseModel) Commit(ctx TxnContext) error
- func (this *BaseModel) Count(query interface{}) int
- func (this *BaseModel) Db(db ...string) *mgo.Database
- func (this *BaseModel) Deletes(query interface{}, softDelete ...bool) (*mgo.ChangeInfo, error)
- func (this *BaseModel) Document() *mgo.Collection
- func (this *BaseModel) Error() error
- func (this *BaseModel) Exists(query interface{}) bool
- func (this *BaseModel) FindOne(query interface{}, result interface{}, selects ...interface{}) error
- func (this *BaseModel) GetById(id string, result interface{}, selects ...interface{}) error
- func (this *BaseModel) GetByKey(key string, v interface{}, result interface{}) error
- func (this *BaseModel) GetByObjectId(id bson.ObjectId, result interface{}, selects ...interface{}) error
- func (this *BaseModel) GetConn(conn ...string) *mgo.Session
- func (this *BaseModel) GetDatabaseName(conn ...string) string
- func (this *BaseModel) GetProfile(key string, defaults ...interface{}) interface{}
- func (this *BaseModel) Gets(query interface{}, result interface{}, selects ...interface{}) error
- func (this *BaseModel) IncrBy(query interface{}, incr interface{}) error
- func (this *BaseModel) Init()
- func (this *BaseModel) Insert(docs interface{}) error
- func (this *BaseModel) Inserts(docs []interface{}) error
- func (this *BaseModel) IsDuplicate(err error) bool
- func (this *BaseModel) IsErrCursor(err error) bool
- func (this *BaseModel) IsNotFound(err error) bool
- func (this *BaseModel) Lists(query interface{}, result interface{}, limit ListsParams, ...) (int, error)
- func (this *BaseModel) ListsQuery(query interface{}, limit ListsParams, selects ...interface{}) *mgo.Query
- func (this *BaseModel) NewQuery(query bson.M) *mgo.Query
- func (this *BaseModel) Pipe(handler func(pipe *mgo.Pipe) interface{}) interface{}
- func (this *BaseModel) Release()
- func (this *BaseModel) Remove(query interface{}, softDelete ...bool) error
- func (this *BaseModel) Self() Model
- func (this *BaseModel) Server(server ...string) *mgo.Session
- func (this *BaseModel) SetProfile(key string, v interface{}) Model
- func (this *BaseModel) StartTxn(docs ...*mgo.Collection) (bson.ObjectId, *txn.Runner)
- func (this *BaseModel) Sum(query bson.M, sum string) int
- func (this *BaseModel) Txn(handler func(runner *txn.Runner, txnId bson.ObjectId) error) error
- func (this *BaseModel) UnUseSoftDel()
- func (this *BaseModel) Update(query interface{}, data interface{}) error
- func (this *BaseModel) UpdateById(id string, data interface{}) error
- func (this *BaseModel) Updates(query interface{}, data interface{}) (*mgo.ChangeInfo, error)
- func (this *BaseModel) UseScopeQuery(m bson.M) bson.M
- func (this *BaseModel) UseSoftDelete(status ...int64)
- func (this *BaseModel) WrapperScopeQuery(query interface{}) interface{}
- type CaptchaModel
- type ClassifyModel
- type Collect
- func (this *Collect) AddExcludeKeys(key ...string)
- func (this *Collect) AddFilters(filters ...func(m beego.M) beego.M)
- func (this *Collect) Excludes(key string) bool
- func (this *Collect) Foreach(each func(k string, v interface{}) bool)
- func (this *Collect) GetFormatterTime(key string) func(data beego.M) beego.M
- func (this *Collect) GetId() bson.ObjectId
- func (this *Collect) GetKeysFilter(keys []string, excludes ...bool) func(data beego.M) beego.M
- func (this *Collect) GetNow() time.Time
- func (this *Collect) GetTransformFilter(transform func(key string, v interface{}, data *beego.M)) func(data beego.M) beego.M
- func (this *Collect) GetTransformFilterByKey(key string, trans func(v interface{}) interface{}) func(data beego.M) beego.M
- func (this *Collect) Init()
- func (this *Collect) InitDefault()
- func (this *Collect) IsEmpty(v interface{}) bool
- func (this *Collect) Keys() []string
- func (this *Collect) M(filter ...func(m beego.M) beego.M) beego.M
- func (this *Collect) Map(each func(k string, v interface{}, result interface{}) interface{}, ...) interface{}
- func (this *Collect) Merger(m beego.M, m2 beego.M) beego.M
- func (this *Collect) RemoveExcludeKeys(key ...string)
- func (this *Collect) Save() error
- func (this *Collect) Set(key string, v interface{}) *Collect
- func (this *Collect) SetAttributes(m map[string]interface{}, safe ...bool)
- func (this *Collect) SetBool(value *bool, v interface{}) bool
- func (this *Collect) SetBsonMapper(tObj *bson.M, v interface{}, force ...bool) bool
- func (this *Collect) SetMap(tObj *map[string]interface{}, v interface{}, force ...bool) bool
- func (this *Collect) SetMapper(tObj *beego.M, v interface{}, force ...bool) bool
- func (this *Collect) SetNumInt(num *int, v interface{}) bool
- func (this *Collect) SetNumIntN(num *int64, v interface{}) bool
- func (this *Collect) SetObjectId(objId *bson.ObjectId, v interface{}) bool
- func (this *Collect) SetProvider(name string, v interface{})
- func (this *Collect) SetSameTypeValue(obj interface{}, v interface{}) bool
- func (this *Collect) SetString(str *string, v interface{}) bool
- func (this *Collect) SetStringArr(arr *[]string, v interface{}) bool
- func (this *Collect) SetTime(tObj *time.Time, v interface{}, force ...bool) bool
- func (this *Collect) Values() []interface{}
- type CollectModel
- type Comment
- func (this *Comment) AddExcludeKeys(key ...string)
- func (this *Comment) AddFilters(filters ...func(m beego.M) beego.M)
- func (this *Comment) CheckType() bool
- func (this *Comment) Defaults() *Comment
- func (this *Comment) Excludes(key string) bool
- func (this *Comment) Foreach(each func(k string, v interface{}) bool)
- func (this *Comment) GetFormatterTime(key string) func(data beego.M) beego.M
- func (this *Comment) GetId() bson.ObjectId
- func (this *Comment) GetKeysFilter(keys []string, excludes ...bool) func(data beego.M) beego.M
- func (this *Comment) GetNow() time.Time
- func (this *Comment) GetStatusText() string
- func (this *Comment) GetTransformFilter(transform func(key string, v interface{}, data *beego.M)) func(data beego.M) beego.M
- func (this *Comment) GetTransformFilterByKey(key string, trans func(v interface{}) interface{}) func(data beego.M) beego.M
- func (this *Comment) InitDefault()
- func (this *Comment) IsEmpty(v interface{}) bool
- func (this *Comment) Keys() []string
- func (this *Comment) Load(data map[string]interface{}) *Comment
- func (this *Comment) M(filters ...func(m beego.M) beego.M) beego.M
- func (this *Comment) Map(each func(k string, v interface{}, result interface{}) interface{}, ...) interface{}
- func (this *Comment) Merger(m beego.M, m2 beego.M) beego.M
- func (this *Comment) RemoveExcludeKeys(key ...string)
- func (this *Comment) Save() error
- func (this *Comment) Set(key string, v interface{}) *Comment
- func (this *Comment) SetAttributes(m map[string]interface{}, safe ...bool)
- func (this *Comment) SetBool(value *bool, v interface{}) bool
- func (this *Comment) SetBsonMapper(tObj *bson.M, v interface{}, force ...bool) bool
- func (this *Comment) SetMap(tObj *map[string]interface{}, v interface{}, force ...bool) bool
- func (this *Comment) SetMapper(tObj *beego.M, v interface{}, force ...bool) bool
- func (this *Comment) SetNumInt(num *int, v interface{}) bool
- func (this *Comment) SetNumIntN(num *int64, v interface{}) bool
- func (this *Comment) SetObjectId(objId *bson.ObjectId, v interface{}) bool
- func (this *Comment) SetProvider(name string, v interface{})
- func (this *Comment) SetSameTypeValue(obj interface{}, v interface{}) bool
- func (this *Comment) SetString(str *string, v interface{}) bool
- func (this *Comment) SetStringArr(arr *[]string, v interface{}) bool
- func (this *Comment) SetTime(tObj *time.Time, v interface{}, force ...bool) bool
- func (this *Comment) Values() []interface{}
- type CommentModel
- type Config
- func (this *Config) AddExcludeKeys(key ...string)
- func (this *Config) AddFilters(filters ...func(m beego.M) beego.M)
- func (this *Config) Excludes(key string) bool
- func (this *Config) Foreach(each func(k string, v interface{}) bool)
- func (this *Config) GetFormatterTime(key string) func(data beego.M) beego.M
- func (this *Config) GetId() bson.ObjectId
- func (this *Config) GetKeysFilter(keys []string, excludes ...bool) func(data beego.M) beego.M
- func (this *Config) GetNow() time.Time
- func (this *Config) GetTransformFilter(transform func(key string, v interface{}, data *beego.M)) func(data beego.M) beego.M
- func (this *Config) GetTransformFilterByKey(key string, trans func(v interface{}) interface{}) func(data beego.M) beego.M
- func (this *Config) Init()
- func (this *Config) InitDefault()
- func (this *Config) InitTimes()
- func (this *Config) IsEmpty(v interface{}) bool
- func (this *Config) Keys() []string
- func (this *Config) M(filter ...func(m beego.M) beego.M) beego.M
- func (this *Config) Map(each func(k string, v interface{}, result interface{}) interface{}, ...) interface{}
- func (this *Config) Merger(m beego.M, m2 beego.M) beego.M
- func (this *Config) RemoveExcludeKeys(key ...string)
- func (this *Config) Save() error
- func (this *Config) Set(key string, v interface{}) *Config
- func (this *Config) SetAttributes(m map[string]interface{}, safe ...bool)
- func (this *Config) SetBool(value *bool, v interface{}) bool
- func (this *Config) SetBsonMapper(tObj *bson.M, v interface{}, force ...bool) bool
- func (this *Config) SetMap(tObj *map[string]interface{}, v interface{}, force ...bool) bool
- func (this *Config) SetMapper(tObj *beego.M, v interface{}, force ...bool) bool
- func (this *Config) SetNumInt(num *int, v interface{}) bool
- func (this *Config) SetNumIntN(num *int64, v interface{}) bool
- func (this *Config) SetObjectId(objId *bson.ObjectId, v interface{}) bool
- func (this *Config) SetProvider(name string, v interface{})
- func (this *Config) SetSameTypeValue(obj interface{}, v interface{}) bool
- func (this *Config) SetString(str *string, v interface{}) bool
- func (this *Config) SetStringArr(arr *[]string, v interface{}) bool
- func (this *Config) SetTime(tObj *time.Time, v interface{}, force ...bool) bool
- func (this *Config) Values() []interface{}
- type ConfigModel
- func (this *ConfigModel) CreateIndex(force ...bool)
- func (this *ConfigModel) Get(key string, scope string, state ...int) *Config
- func (this *ConfigModel) GetBool(key string, scope ...string) bool
- func (this *ConfigModel) GetByUnique(data map[string]interface{}, state ...int) *Config
- func (this *ConfigModel) GetItemsByScope(scope string, state ...int) []Config
- func (this *ConfigModel) GetString(key string, scope ...string) string
- func (this *ConfigModel) Remove(key string, scope ...string) error
- func (this *ConfigModel) Set(key string, v interface{}, scope ...string) error
- func (this *ConfigModel) TableName() string
- type ConnOption
- type DataClass
- type DiscoverModel
- type FullListsParams
- type HeaderSchema
- func (this *HeaderSchema) AddExcludeKeys(key ...string)
- func (this *HeaderSchema) AddFilters(filters ...func(m beego.M) beego.M)
- func (this *HeaderSchema) Excludes(key string) bool
- func (this *HeaderSchema) Foreach(each func(k string, v interface{}) bool)
- func (this *HeaderSchema) GetFormatterTime(key string) func(data beego.M) beego.M
- func (this *HeaderSchema) GetId() bson.ObjectId
- func (this *HeaderSchema) GetKeysFilter(keys []string, excludes ...bool) func(data beego.M) beego.M
- func (this *HeaderSchema) GetNow() time.Time
- func (this *HeaderSchema) GetTransformFilter(transform func(key string, v interface{}, data *beego.M)) func(data beego.M) beego.M
- func (this *HeaderSchema) GetTransformFilterByKey(key string, trans func(v interface{}) interface{}) func(data beego.M) beego.M
- func (this *HeaderSchema) Init()
- func (this *HeaderSchema) InitDefault()
- func (this *HeaderSchema) IsEmpty(v interface{}) bool
- func (this *HeaderSchema) Keys() []string
- func (this *HeaderSchema) M(filter ...func(m beego.M) beego.M) beego.M
- func (this *HeaderSchema) Map(each func(k string, v interface{}, result interface{}) interface{}, ...) interface{}
- func (this *HeaderSchema) Merger(m beego.M, m2 beego.M) beego.M
- func (this *HeaderSchema) RemoveExcludeKeys(key ...string)
- func (this *HeaderSchema) Save() error
- func (this *HeaderSchema) Set(_ string, _ interface{}) *HeaderSchema
- func (this *HeaderSchema) SetAttributes(m map[string]interface{}, safe ...bool)
- func (this *HeaderSchema) SetBool(value *bool, v interface{}) bool
- func (this *HeaderSchema) SetBsonMapper(tObj *bson.M, v interface{}, force ...bool) bool
- func (this *HeaderSchema) SetMap(tObj *map[string]interface{}, v interface{}, force ...bool) bool
- func (this *HeaderSchema) SetMapper(tObj *beego.M, v interface{}, force ...bool) bool
- func (this *HeaderSchema) SetNumInt(num *int, v interface{}) bool
- func (this *HeaderSchema) SetNumIntN(num *int64, v interface{}) bool
- func (this *HeaderSchema) SetObjectId(objId *bson.ObjectId, v interface{}) bool
- func (this *HeaderSchema) SetProvider(name string, v interface{})
- func (this *HeaderSchema) SetSameTypeValue(obj interface{}, v interface{}) bool
- func (this *HeaderSchema) SetString(str *string, v interface{}) bool
- func (this *HeaderSchema) SetStringArr(arr *[]string, v interface{}) bool
- func (this *HeaderSchema) SetTime(tObj *time.Time, v interface{}, force ...bool) bool
- func (this *HeaderSchema) Values() []interface{}
- type Image
- type IndexConstructor
- type ListParamsExtras
- type ListsParamImpl
- func (this *ListsParamImpl) Count() int
- func (this *ListsParamImpl) GetArg(key string) interface{}
- func (this *ListsParamImpl) More() bool
- func (this *ListsParamImpl) Order(key, order string)
- func (this *ListsParamImpl) Page() int
- func (this *ListsParamImpl) ParseOrder(query *mgo.Query)
- func (this *ListsParamImpl) SetArg(key string, v interface{})
- func (this *ListsParamImpl) SetTotal(total int) ListsParams
- func (this *ListsParamImpl) Skip() int
- type ListsParams
- type Location
- type Location3d
- type MapperAble
- type MessageLog
- type MessageModel
- type MessageTemplate
- type MessageTemplateModel
- type Meta
- func (this *Meta) Boot()
- func (this *Meta) Count() int
- func (this *Meta) Init() *Meta
- func (this *Meta) M() beego.M
- func (this *Meta) More() bool
- func (this *Meta) Page() int
- func (this *Meta) Set(key string, v interface{}) *Meta
- func (this *Meta) SetTotal(i int) ListsParams
- func (this *Meta) Skip() int
- type Model
- type Null
- type OrderByParam
- type Permission
- type PopularizationChannels
- func (this *PopularizationChannels) AddExcludeKeys(key ...string)
- func (this *PopularizationChannels) AddFilters(filters ...func(m beego.M) beego.M)
- func (this *PopularizationChannels) Excludes(key string) bool
- func (this *PopularizationChannels) Foreach(each func(k string, v interface{}) bool)
- func (this *PopularizationChannels) GetFormatterTime(key string) func(data beego.M) beego.M
- func (this *PopularizationChannels) GetId() bson.ObjectId
- func (this *PopularizationChannels) GetKeysFilter(keys []string, excludes ...bool) func(data beego.M) beego.M
- func (this *PopularizationChannels) GetNow() time.Time
- func (this *PopularizationChannels) GetTransformFilter(transform func(key string, v interface{}, data *beego.M)) func(data beego.M) beego.M
- func (this *PopularizationChannels) GetTransformFilterByKey(key string, trans func(v interface{}) interface{}) func(data beego.M) beego.M
- func (this *PopularizationChannels) Incr(key string, incr ...int) bool
- func (this *PopularizationChannels) Init()
- func (this *PopularizationChannels) InitDefault()
- func (this *PopularizationChannels) IsEmpty(v interface{}) bool
- func (this *PopularizationChannels) IsOk() bool
- func (this *PopularizationChannels) Keys() []string
- func (this *PopularizationChannels) M(filter ...func(m beego.M) beego.M) beego.M
- func (this *PopularizationChannels) Map(each func(k string, v interface{}, result interface{}) interface{}, ...) interface{}
- func (this *PopularizationChannels) Merger(m beego.M, m2 beego.M) beego.M
- func (this *PopularizationChannels) RemoveExcludeKeys(key ...string)
- func (this *PopularizationChannels) Save() error
- func (this *PopularizationChannels) Set(key string, v interface{}) *PopularizationChannels
- func (this *PopularizationChannels) SetAttributes(m map[string]interface{}, safe ...bool)
- func (this *PopularizationChannels) SetBool(value *bool, v interface{}) bool
- func (this *PopularizationChannels) SetBsonMapper(tObj *bson.M, v interface{}, force ...bool) bool
- func (this *PopularizationChannels) SetMap(tObj *map[string]interface{}, v interface{}, force ...bool) bool
- func (this *PopularizationChannels) SetMapper(tObj *beego.M, v interface{}, force ...bool) bool
- func (this *PopularizationChannels) SetNumInt(num *int, v interface{}) bool
- func (this *PopularizationChannels) SetNumIntN(num *int64, v interface{}) bool
- func (this *PopularizationChannels) SetObjectId(objId *bson.ObjectId, v interface{}) bool
- func (this *PopularizationChannels) SetProvider(name string, v interface{})
- func (this *PopularizationChannels) SetSameTypeValue(obj interface{}, v interface{}) bool
- func (this *PopularizationChannels) SetString(str *string, v interface{}) bool
- func (this *PopularizationChannels) SetStringArr(arr *[]string, v interface{}) bool
- func (this *PopularizationChannels) SetTime(tObj *time.Time, v interface{}, force ...bool) bool
- func (this *PopularizationChannels) Values() []interface{}
- func (this *PopularizationChannels) Verify() error
- type PopularizationChannelsModel
- type PostsModel
- type RecommendModel
- type RequestLog
- func (this *RequestLog) AddExcludeKeys(key ...string)
- func (this *RequestLog) AddFilters(filters ...func(m beego.M) beego.M)
- func (this *RequestLog) Excludes(key string) bool
- func (this *RequestLog) Foreach(each func(k string, v interface{}) bool)
- func (this *RequestLog) GetFormatterTime(key string) func(data beego.M) beego.M
- func (this *RequestLog) GetId() bson.ObjectId
- func (this *RequestLog) GetKeysFilter(keys []string, excludes ...bool) func(data beego.M) beego.M
- func (this *RequestLog) GetNow() time.Time
- func (this *RequestLog) GetTransformFilter(transform func(key string, v interface{}, data *beego.M)) func(data beego.M) beego.M
- func (this *RequestLog) GetTransformFilterByKey(key string, trans func(v interface{}) interface{}) func(data beego.M) beego.M
- func (this *RequestLog) Init()
- func (this *RequestLog) InitDefault()
- func (this *RequestLog) IsEmpty(v interface{}) bool
- func (this *RequestLog) Keys() []string
- func (this *RequestLog) M(filter ...func(m beego.M) beego.M) beego.M
- func (this *RequestLog) Map(each func(k string, v interface{}, result interface{}) interface{}, ...) interface{}
- func (this *RequestLog) Merger(m beego.M, m2 beego.M) beego.M
- func (this *RequestLog) RemoveExcludeKeys(key ...string)
- func (this *RequestLog) Save() error
- func (this *RequestLog) Set(key string, v interface{}) *RequestLog
- func (this *RequestLog) SetAttributes(m map[string]interface{}, safe ...bool)
- func (this *RequestLog) SetBool(value *bool, v interface{}) bool
- func (this *RequestLog) SetBsonMapper(tObj *bson.M, v interface{}, force ...bool) bool
- func (this *RequestLog) SetMap(tObj *map[string]interface{}, v interface{}, force ...bool) bool
- func (this *RequestLog) SetMapper(tObj *beego.M, v interface{}, force ...bool) bool
- func (this *RequestLog) SetNumInt(num *int, v interface{}) bool
- func (this *RequestLog) SetNumIntN(num *int64, v interface{}) bool
- func (this *RequestLog) SetObjectId(objId *bson.ObjectId, v interface{}) bool
- func (this *RequestLog) SetProvider(name string, v interface{})
- func (this *RequestLog) SetSameTypeValue(obj interface{}, v interface{}) bool
- func (this *RequestLog) SetString(str *string, v interface{}) bool
- func (this *RequestLog) SetStringArr(arr *[]string, v interface{}) bool
- func (this *RequestLog) SetTime(tObj *time.Time, v interface{}, force ...bool) bool
- func (this *RequestLog) Values() []interface{}
- type RequestLogModel
- type SensitiveWords
- func (this *SensitiveWords) AddExcludeKeys(key ...string)
- func (this *SensitiveWords) AddFilters(filters ...func(m beego.M) beego.M)
- func (this *SensitiveWords) Excludes(key string) bool
- func (this *SensitiveWords) Foreach(each func(k string, v interface{}) bool)
- func (this *SensitiveWords) GetFormatterTime(key string) func(data beego.M) beego.M
- func (this *SensitiveWords) GetId() bson.ObjectId
- func (this *SensitiveWords) GetKeysFilter(keys []string, excludes ...bool) func(data beego.M) beego.M
- func (this *SensitiveWords) GetNow() time.Time
- func (this *SensitiveWords) GetTransformFilter(transform func(key string, v interface{}, data *beego.M)) func(data beego.M) beego.M
- func (this *SensitiveWords) GetTransformFilterByKey(key string, trans func(v interface{}) interface{}) func(data beego.M) beego.M
- func (this *SensitiveWords) Init()
- func (this *SensitiveWords) InitDefault()
- func (this *SensitiveWords) IsEmpty(v interface{}) bool
- func (this *SensitiveWords) Keys() []string
- func (this *SensitiveWords) M(filter ...func(m beego.M) beego.M) beego.M
- func (this *SensitiveWords) Map(each func(k string, v interface{}, result interface{}) interface{}, ...) interface{}
- func (this *SensitiveWords) Merger(m beego.M, m2 beego.M) beego.M
- func (this *SensitiveWords) RemoveExcludeKeys(key ...string)
- func (this *SensitiveWords) Save() error
- func (this *SensitiveWords) Set(key string, v interface{}) *SensitiveWords
- func (this *SensitiveWords) SetAttributes(m map[string]interface{}, safe ...bool)
- func (this *SensitiveWords) SetBool(value *bool, v interface{}) bool
- func (this *SensitiveWords) SetBsonMapper(tObj *bson.M, v interface{}, force ...bool) bool
- func (this *SensitiveWords) SetMap(tObj *map[string]interface{}, v interface{}, force ...bool) bool
- func (this *SensitiveWords) SetMapper(tObj *beego.M, v interface{}, force ...bool) bool
- func (this *SensitiveWords) SetNumInt(num *int, v interface{}) bool
- func (this *SensitiveWords) SetNumIntN(num *int64, v interface{}) bool
- func (this *SensitiveWords) SetObjectId(objId *bson.ObjectId, v interface{}) bool
- func (this *SensitiveWords) SetProvider(name string, v interface{})
- func (this *SensitiveWords) SetSameTypeValue(obj interface{}, v interface{}) bool
- func (this *SensitiveWords) SetString(str *string, v interface{}) bool
- func (this *SensitiveWords) SetStringArr(arr *[]string, v interface{}) bool
- func (this *SensitiveWords) SetTime(tObj *time.Time, v interface{}, force ...bool) bool
- func (this *SensitiveWords) Values() []interface{}
- type SensitiveWordsModel
- func (this *SensitiveWordsModel) Adds(words []string, ty string, app ...string) error
- func (this *SensitiveWordsModel) CreateIndex(force ...bool)
- func (this *SensitiveWordsModel) Filters(words string) string
- func (this *SensitiveWordsModel) Foreach(each func(it *SensitiveWords) bool, limit ...int)
- func (this *SensitiveWordsModel) GetByUnique(m beego.M) *SensitiveWords
- func (this *SensitiveWordsModel) GetTotal() int
- func (this *SensitiveWordsModel) TableName() string
- type SmsLog
- type SmsLogModel
- type SmsTemplate
- type StrArray
- type StrArrayEntry
- func (this *StrArrayEntry) Append(value string) *StrArrayEntry
- func (this *StrArrayEntry) Cap() int
- func (this *StrArrayEntry) Copy() *StrArrayEntry
- func (this *StrArrayEntry) Count() int
- func (this *StrArrayEntry) Foreach(each func(i int, value string) bool)
- func (this *StrArrayEntry) GetKey() string
- func (this *StrArrayEntry) Included(v string, fold ...bool) bool
- func (this *StrArrayEntry) Init()
- func (this *StrArrayEntry) Joins(joins ...[]string) *StrArrayEntry
- func (this *StrArrayEntry) Len() int
- func (this *StrArrayEntry) Pop() string
- func (this *StrArrayEntry) Push(i int, value string) *StrArrayEntry
- func (this *StrArrayEntry) Search(v string, fold ...bool) int
- func (this *StrArrayEntry) SetKey(key string) *StrArrayEntry
- func (this *StrArrayEntry) ToMapper() beego.M
- func (this *StrArrayEntry) Values() []string
- type TableNameAble
- type Tag
- func (this *Tag) AddExcludeKeys(key ...string)
- func (this *Tag) AddFilters(filters ...func(m beego.M) beego.M)
- func (this *Tag) Excludes(key string) bool
- func (this *Tag) Foreach(each func(k string, v interface{}) bool)
- func (this *Tag) GetFormatterTime(key string) func(data beego.M) beego.M
- func (this *Tag) GetId() bson.ObjectId
- func (this *Tag) GetKeysFilter(keys []string, excludes ...bool) func(data beego.M) beego.M
- func (this *Tag) GetNow() time.Time
- func (this *Tag) GetTransformFilter(transform func(key string, v interface{}, data *beego.M)) func(data beego.M) beego.M
- func (this *Tag) GetTransformFilterByKey(key string, trans func(v interface{}) interface{}) func(data beego.M) beego.M
- func (this *Tag) Init()
- func (this *Tag) InitDefault()
- func (this *Tag) IsEmpty(v interface{}) bool
- func (this *Tag) Keys() []string
- func (this *Tag) M(filter ...func(m beego.M) beego.M) beego.M
- func (this *Tag) Map(each func(k string, v interface{}, result interface{}) interface{}, ...) interface{}
- func (this *Tag) Merger(m beego.M, m2 beego.M) beego.M
- func (this *Tag) RemoveExcludeKeys(key ...string)
- func (this *Tag) Save() error
- func (this *Tag) Set(key string, v interface{}) *Tag
- func (this *Tag) SetAttributes(m map[string]interface{}, safe ...bool)
- func (this *Tag) SetBool(value *bool, v interface{}) bool
- func (this *Tag) SetBsonMapper(tObj *bson.M, v interface{}, force ...bool) bool
- func (this *Tag) SetMap(tObj *map[string]interface{}, v interface{}, force ...bool) bool
- func (this *Tag) SetMapper(tObj *beego.M, v interface{}, force ...bool) bool
- func (this *Tag) SetNumInt(num *int, v interface{}) bool
- func (this *Tag) SetNumIntN(num *int64, v interface{}) bool
- func (this *Tag) SetObjectId(objId *bson.ObjectId, v interface{}) bool
- func (this *Tag) SetProvider(name string, v interface{})
- func (this *Tag) SetSameTypeValue(obj interface{}, v interface{}) bool
- func (this *Tag) SetString(str *string, v interface{}) bool
- func (this *Tag) SetStringArr(arr *[]string, v interface{}) bool
- func (this *Tag) SetTime(tObj *time.Time, v interface{}, force ...bool) bool
- func (this *Tag) Values() []interface{}
- type TagModel
- func (this *TagModel) Adds(items []map[string]interface{}) error
- func (this *TagModel) CreateIndex(force ...bool)
- func (this *TagModel) GetByUnique(data map[string]interface{}) *Tag
- func (this *TagModel) GetTags(group string) []Tag
- func (this *TagModel) GetTagsByGroup(group ...string) []string
- func (this *TagModel) TableName() string
- type ThumbsUp
- type ThumbsUpModel
- type TravelNotes
- func (this *TravelNotes) CanHasVideo() bool
- func (this *TravelNotes) Defaults() *TravelNotes
- func (this *TravelNotes) GetImages() []*Image
- func (this *TravelNotes) GetPrivacy() string
- func (this *TravelNotes) GetState() string
- func (this *TravelNotes) GetTagsText() []string
- func (this *TravelNotes) GetType() string
- func (this *TravelNotes) GetTypeCode() string
- func (this *TravelNotes) GetVideos() []*Video
- func (this *TravelNotes) IsAutoAuditType() bool
- func (this *TravelNotes) IsEmpty() bool
- func (this *TravelNotes) Load(data bson.M) *TravelNotes
- func (this *TravelNotes) M(filters ...func(m beego.M) beego.M) beego.M
- func (this *TravelNotes) Save() error
- func (this *TravelNotes) Set(key string, v interface{}) *TravelNotes
- type TxnContext
- type UrlAccessService
- type User
- func (this *User) AddExcludeKeys(key ...string)
- func (this *User) AddFilters(filters ...func(m beego.M) beego.M)
- func (this *User) Defaults() *User
- func (this *User) Excludes(key string) bool
- func (this *User) Foreach(each func(k string, v interface{}) bool)
- func (this *User) GetAddress(typ ...int) string
- func (this *User) GetFormatterTime(key string) func(data beego.M) beego.M
- func (this *User) GetId() bson.ObjectId
- func (this *User) GetInviteCode(refresh ...bool) string
- func (this *User) GetKeysFilter(keys []string, excludes ...bool) func(data beego.M) beego.M
- func (this *User) GetMobile() string
- func (this *User) GetNickName() string
- func (this *User) GetNow() time.Time
- func (this *User) GetPasswordHash() string
- func (this *User) GetRoleDesc(role int) string
- func (this *User) GetTransformFilter(transform func(key string, v interface{}, data *beego.M)) func(data beego.M) beego.M
- func (this *User) GetTransformFilterByKey(key string, trans func(v interface{}) interface{}) func(data beego.M) beego.M
- func (this *User) GetUserNumId() int64
- func (this *User) InitDefault()
- func (this *User) IsBlackList() bool
- func (this *User) IsEmpty(v interface{}) bool
- func (this *User) IsForbid() bool
- func (this *User) IsRootRole() bool
- func (this *User) Keys() []string
- func (this *User) Load(data map[string]interface{}) *User
- func (this *User) M(filter ...func(m beego.M) beego.M) beego.M
- func (this *User) Map(each func(k string, v interface{}, result interface{}) interface{}, ...) interface{}
- func (this *User) Merger(m beego.M, m2 beego.M) beego.M
- func (this *User) RemoveExcludeKeys(key ...string)
- func (this *User) Save() error
- func (this *User) Set(key string, v interface{}) *User
- func (this *User) SetAttributes(m map[string]interface{}, safe ...bool)
- func (this *User) SetBool(value *bool, v interface{}) bool
- func (this *User) SetBsonMapper(tObj *bson.M, v interface{}, force ...bool) bool
- func (this *User) SetMap(tObj *map[string]interface{}, v interface{}, force ...bool) bool
- func (this *User) SetMapper(tObj *beego.M, v interface{}, force ...bool) bool
- func (this *User) SetNumInt(num *int, v interface{}) bool
- func (this *User) SetNumIntN(num *int64, v interface{}) bool
- func (this *User) SetObjectId(objId *bson.ObjectId, v interface{}) bool
- func (this *User) SetProvider(name string, v interface{})
- func (this *User) SetSameTypeValue(obj interface{}, v interface{}) bool
- func (this *User) SetString(str *string, v interface{}) bool
- func (this *User) SetStringArr(arr *[]string, v interface{}) bool
- func (this *User) SetTime(tObj *time.Time, v interface{}, force ...bool) bool
- func (this *User) Values() []interface{}
- type UserAddress
- func (this *UserAddress) AddExcludeKeys(key ...string)
- func (this *UserAddress) AddFilters(filters ...func(m beego.M) beego.M)
- func (this *UserAddress) Excludes(key string) bool
- func (this *UserAddress) Foreach(each func(k string, v interface{}) bool)
- func (this *UserAddress) GetFormatterTime(key string) func(data beego.M) beego.M
- func (this *UserAddress) GetId() bson.ObjectId
- func (this *UserAddress) GetKeysFilter(keys []string, excludes ...bool) func(data beego.M) beego.M
- func (this *UserAddress) GetNow() time.Time
- func (this *UserAddress) GetTransformFilter(transform func(key string, v interface{}, data *beego.M)) func(data beego.M) beego.M
- func (this *UserAddress) GetTransformFilterByKey(key string, trans func(v interface{}) interface{}) func(data beego.M) beego.M
- func (this *UserAddress) IncrVersion() *UserAddress
- func (this *UserAddress) Init()
- func (this *UserAddress) InitDefault()
- func (this *UserAddress) IsEmpty(v interface{}) bool
- func (this *UserAddress) Keys() []string
- func (this *UserAddress) Load(data map[string]interface{}) *UserAddress
- func (this *UserAddress) Location() *Location
- func (this *UserAddress) M(filter ...func(m beego.M) beego.M) beego.M
- func (this *UserAddress) Map(each func(k string, v interface{}, result interface{}) interface{}, ...) interface{}
- func (this *UserAddress) Merger(m beego.M, m2 beego.M) beego.M
- func (this *UserAddress) Parse(v interface{}) bool
- func (this *UserAddress) RemoveExcludeKeys(key ...string)
- func (this *UserAddress) Save() error
- func (this *UserAddress) Set(key string, v interface{}) *UserAddress
- func (this *UserAddress) SetAttributes(m map[string]interface{}, safe ...bool)
- func (this *UserAddress) SetBool(value *bool, v interface{}) bool
- func (this *UserAddress) SetBsonMapper(tObj *bson.M, v interface{}, force ...bool) bool
- func (this *UserAddress) SetMap(tObj *map[string]interface{}, v interface{}, force ...bool) bool
- func (this *UserAddress) SetMapper(tObj *beego.M, v interface{}, force ...bool) bool
- func (this *UserAddress) SetNumInt(num *int, v interface{}) bool
- func (this *UserAddress) SetNumIntN(num *int64, v interface{}) bool
- func (this *UserAddress) SetObjectId(objId *bson.ObjectId, v interface{}) bool
- func (this *UserAddress) SetProvider(name string, v interface{})
- func (this *UserAddress) SetSameTypeValue(obj interface{}, v interface{}) bool
- func (this *UserAddress) SetString(str *string, v interface{}) bool
- func (this *UserAddress) SetStringArr(arr *[]string, v interface{}) bool
- func (this *UserAddress) SetTime(tObj *time.Time, v interface{}, force ...bool) bool
- func (this *UserAddress) String() string
- func (this *UserAddress) Update() error
- func (this *UserAddress) Values() []interface{}
- type UserAddressModel
- func (this *UserAddressModel) CreateIndex(force ...bool)
- func (this *UserAddressModel) GetAddressByUserId(userId bson.ObjectId, typ ...int) *UserAddress
- func (this *UserAddressModel) GetUserAddress(userId bson.ObjectId, typ int) string
- func (this *UserAddressModel) GetUserAddressList(userId bson.ObjectId, typ int) []string
- func (this *UserAddressModel) TableName() string
- type UserFocusModel
- func (this *UserFocusModel) Count(m beego.M) int64
- func (this *UserFocusModel) CreateIndex(force ...bool)
- func (this *UserFocusModel) GetByUnique(m beego.M) *UserFollow
- func (this *UserFocusModel) GetFocusCount(userId string) int
- func (this *UserFocusModel) GetFocusTwo(userId, userId2 string) bool
- func (this *UserFocusModel) GetUserFocusCount(userId string) int
- func (this *UserFocusModel) GetUserFocusLists(userId string, params ...ListsParams) ([]*UserFollow, ListsParams)
- func (this *UserFocusModel) TableName() string
- type UserFollow
- func (this *UserFollow) AddExcludeKeys(key ...string)
- func (this *UserFollow) AddFilters(filters ...func(m beego.M) beego.M)
- func (this *UserFollow) Excludes(key string) bool
- func (this *UserFollow) Foreach(each func(k string, v interface{}) bool)
- func (this *UserFollow) GetFormatterTime(key string) func(data beego.M) beego.M
- func (this *UserFollow) GetId() bson.ObjectId
- func (this *UserFollow) GetKeysFilter(keys []string, excludes ...bool) func(data beego.M) beego.M
- func (this *UserFollow) GetNow() time.Time
- func (this *UserFollow) GetTransformFilter(transform func(key string, v interface{}, data *beego.M)) func(data beego.M) beego.M
- func (this *UserFollow) GetTransformFilterByKey(key string, trans func(v interface{}) interface{}) func(data beego.M) beego.M
- func (this *UserFollow) Init()
- func (this *UserFollow) InitDefault()
- func (this *UserFollow) IsEmpty(v interface{}) bool
- func (this *UserFollow) Keys() []string
- func (this *UserFollow) M(filter ...func(m beego.M) beego.M) beego.M
- func (this *UserFollow) Map(each func(k string, v interface{}, result interface{}) interface{}, ...) interface{}
- func (this *UserFollow) Merger(m beego.M, m2 beego.M) beego.M
- func (this *UserFollow) RemoveExcludeKeys(key ...string)
- func (this *UserFollow) Save() error
- func (this *UserFollow) Set(key string, v interface{}) *UserFollow
- func (this *UserFollow) SetAttributes(m map[string]interface{}, safe ...bool)
- func (this *UserFollow) SetBool(value *bool, v interface{}) bool
- func (this *UserFollow) SetBsonMapper(tObj *bson.M, v interface{}, force ...bool) bool
- func (this *UserFollow) SetMap(tObj *map[string]interface{}, v interface{}, force ...bool) bool
- func (this *UserFollow) SetMapper(tObj *beego.M, v interface{}, force ...bool) bool
- func (this *UserFollow) SetNumInt(num *int, v interface{}) bool
- func (this *UserFollow) SetNumIntN(num *int64, v interface{}) bool
- func (this *UserFollow) SetObjectId(objId *bson.ObjectId, v interface{}) bool
- func (this *UserFollow) SetProvider(name string, v interface{})
- func (this *UserFollow) SetSameTypeValue(obj interface{}, v interface{}) bool
- func (this *UserFollow) SetString(str *string, v interface{}) bool
- func (this *UserFollow) SetStringArr(arr *[]string, v interface{}) bool
- func (this *UserFollow) SetTime(tObj *time.Time, v interface{}, force ...bool) bool
- func (this *UserFollow) Values() []interface{}
- type UserLoginLog
- type UserLoginLogModel
- type UserModel
- type UserProfile
- type UserRelation
- func (this *UserRelation) AddExcludeKeys(key ...string)
- func (this *UserRelation) AddFilters(filters ...func(m beego.M) beego.M)
- func (this *UserRelation) Excludes(key string) bool
- func (this *UserRelation) Foreach(each func(k string, v interface{}) bool)
- func (this *UserRelation) GetFormatterTime(key string) func(data beego.M) beego.M
- func (this *UserRelation) GetId() bson.ObjectId
- func (this *UserRelation) GetKeysFilter(keys []string, excludes ...bool) func(data beego.M) beego.M
- func (this *UserRelation) GetNow() time.Time
- func (this *UserRelation) GetTransformFilter(transform func(key string, v interface{}, data *beego.M)) func(data beego.M) beego.M
- func (this *UserRelation) GetTransformFilterByKey(key string, trans func(v interface{}) interface{}) func(data beego.M) beego.M
- func (this *UserRelation) Init()
- func (this *UserRelation) InitDefault()
- func (this *UserRelation) IsEmpty(v interface{}) bool
- func (this *UserRelation) Keys() []string
- func (this *UserRelation) M(filter ...func(m beego.M) beego.M) beego.M
- func (this *UserRelation) Map(each func(k string, v interface{}, result interface{}) interface{}, ...) interface{}
- func (this *UserRelation) Merger(m beego.M, m2 beego.M) beego.M
- func (this *UserRelation) RemoveExcludeKeys(key ...string)
- func (this *UserRelation) Save() error
- func (this *UserRelation) Set(key string, v interface{}) *UserRelation
- func (this *UserRelation) SetAttributes(m map[string]interface{}, safe ...bool)
- func (this *UserRelation) SetBool(value *bool, v interface{}) bool
- func (this *UserRelation) SetBsonMapper(tObj *bson.M, v interface{}, force ...bool) bool
- func (this *UserRelation) SetMap(tObj *map[string]interface{}, v interface{}, force ...bool) bool
- func (this *UserRelation) SetMapper(tObj *beego.M, v interface{}, force ...bool) bool
- func (this *UserRelation) SetNumInt(num *int, v interface{}) bool
- func (this *UserRelation) SetNumIntN(num *int64, v interface{}) bool
- func (this *UserRelation) SetObjectId(objId *bson.ObjectId, v interface{}) bool
- func (this *UserRelation) SetProvider(name string, v interface{})
- func (this *UserRelation) SetSameTypeValue(obj interface{}, v interface{}) bool
- func (this *UserRelation) SetString(str *string, v interface{}) bool
- func (this *UserRelation) SetStringArr(arr *[]string, v interface{}) bool
- func (this *UserRelation) SetTime(tObj *time.Time, v interface{}, force ...bool) bool
- func (this *UserRelation) Values() []interface{}
- type UserRelationModel
- type UserRoleType
- func (this *UserRoleType) AddExcludeKeys(key ...string)
- func (this *UserRoleType) AddFilters(filters ...func(m beego.M) beego.M)
- func (this *UserRoleType) Excludes(key string) bool
- func (this *UserRoleType) Foreach(each func(k string, v interface{}) bool)
- func (this *UserRoleType) GetFormatterTime(key string) func(data beego.M) beego.M
- func (this *UserRoleType) GetId() bson.ObjectId
- func (this *UserRoleType) GetKeysFilter(keys []string, excludes ...bool) func(data beego.M) beego.M
- func (this *UserRoleType) GetNow() time.Time
- func (this *UserRoleType) GetTransformFilter(transform func(key string, v interface{}, data *beego.M)) func(data beego.M) beego.M
- func (this *UserRoleType) GetTransformFilterByKey(key string, trans func(v interface{}) interface{}) func(data beego.M) beego.M
- func (this *UserRoleType) Init()
- func (this *UserRoleType) InitDefault()
- func (this *UserRoleType) IsEmpty(v interface{}) bool
- func (this *UserRoleType) Keys() []string
- func (this *UserRoleType) M(filter ...func(m beego.M) beego.M) beego.M
- func (this *UserRoleType) Map(each func(k string, v interface{}, result interface{}) interface{}, ...) interface{}
- func (this *UserRoleType) Merger(m beego.M, m2 beego.M) beego.M
- func (this *UserRoleType) RemoveExcludeKeys(key ...string)
- func (this *UserRoleType) Save() error
- func (this *UserRoleType) Set(key string, v interface{}) *UserRoleType
- func (this *UserRoleType) SetAttributes(m map[string]interface{}, safe ...bool)
- func (this *UserRoleType) SetBool(value *bool, v interface{}) bool
- func (this *UserRoleType) SetBsonMapper(tObj *bson.M, v interface{}, force ...bool) bool
- func (this *UserRoleType) SetMap(tObj *map[string]interface{}, v interface{}, force ...bool) bool
- func (this *UserRoleType) SetMapper(tObj *beego.M, v interface{}, force ...bool) bool
- func (this *UserRoleType) SetNumInt(num *int, v interface{}) bool
- func (this *UserRoleType) SetNumIntN(num *int64, v interface{}) bool
- func (this *UserRoleType) SetObjectId(objId *bson.ObjectId, v interface{}) bool
- func (this *UserRoleType) SetProvider(name string, v interface{})
- func (this *UserRoleType) SetSameTypeValue(obj interface{}, v interface{}) bool
- func (this *UserRoleType) SetString(str *string, v interface{}) bool
- func (this *UserRoleType) SetStringArr(arr *[]string, v interface{}) bool
- func (this *UserRoleType) SetTime(tObj *time.Time, v interface{}, force ...bool) bool
- func (this *UserRoleType) Values() []interface{}
- type UserRolesConfigModel
- func (this *UserRolesConfigModel) Adds(items []map[string]interface{}) error
- func (this *UserRolesConfigModel) CreateIndex(force ...bool)
- func (this *UserRolesConfigModel) GetByUnique(data map[string]interface{}) *UserRoleType
- func (this *UserRolesConfigModel) GetRoleName(role int) string
- func (this *UserRolesConfigModel) TableName() string
- type Video
Constants ¶
const ( AddressTableName = "address" AddressLevelProvince = 0 // 省 AddressLevelCity = 1 // 市 AddressLevelDistrict = 2 // 区 AddressLevelTown = 3 // 镇 AddressLevelVillage = 4 // 乡 AddressLevelUnKnown = -1 // 异常 )
const ( DefaultAppName = "游迹" DefaultVersion = "1.0.0" AppVersionTable = "app_versions_info" )
const ( ApplyInfoTable = "apply_infos" // 表名 ApplyTypeReport = "report" // 举报 ApplyTypeSuggest = "suggest" // 建议|反馈 ApplyTypeAllege = "allege" // 申诉 ApplyStatusWait = 0 // 待处理 ApplyStatusPassed = 1 // 处理完毕 ApplyStatusDealing = 2 // 处理中 ApplyStatusReject = 3 // 拒绝处理 )
const ( AttachmentTable = "attachments" AttachTypeImage = "image" AttachTypeImageAvatar = "avatar" AttachTypeDoc = "doc" AttachTypeText = "txt" AttachTypeVideo = "video" AttachTypeAudio = "audio" UrlTicketParam = "ticket" UrlServerFaced = "UrlAccessService" DefaultAliveTime = int64(30 * 24 * time.Hour) )
const ( SaverProvider = "saverProvider" AttributesProvider = "attributesProvider" DataProvider = "dataProvider" DefaultProvider = "defaultProvider" )
const ( CollectTable = "user_collects" CollectTargetTypePost = "post" CollectTargetVideo = "video" StatusActivity = 1 )
const ( CommentTable = "comments" StatusAuditUnPass = -1 StatusAuditPass = 1 StatusAuditWait = 0 StatusOff = 2 CommentTargetTypeComment = "post" CommentTargetTypeReview = "comment" )
const ( ConfigTable = "configs" DefaultConfigRoot = "app" ConfigStateUnInit = 0 ConfigStateOk = 1 ConfigStateDel = 2 )
const ( TravelNotesTable = "travel_posts" PublicPrivacy = 1 OnlySelfPrivacy = 2 ImageType = 1 VideoType = 2 ContentType = 3 StrategyType = 4 PostType = 5 ImageTypeCode = "image" VideoTypeCode = "video" ContentTypeCode = "content" StrategyTypeCode = "strategy" PostTypeCode = "post" StatusAuditNotPass = -1 StatusWaitAudit = 0 StatusAuditOk = 1 StatusAuditOff = 2 )
const ( SensitiveWordsTable = "sensitive_words" // 表名 SensitiveWordsTypeGlobal = "global" InvalidWords = " ,~,!,@,#,$,%,^,&,*,(,),_,-,+,=,?,<,>,.,—,,,。,/,\\,|,《,》,?,;,:,:,',‘,;,“," // 无效字符 )
const ( SmsLogTableName = "sms_log" DefaultProviderName = "aliyun-dysms" )
const ( ThumbsTypePost = "post" // 游记点 ThumbsTypeComment = "comment" // 评论点赞 )
const ( AddressTypeTmp = 0 AddressTypeRegister = 1 AddressTypeCompany = 2 AddressTypeHome = 3 AddressTypeSchool = 4 AddressTypeLogin = 5 AddressTypeVirtual = 6 AddressTypeExpress = 7 AddressStateNil = 0 AddressStateActivate = 1 AddressStateDelete = 2 AddressStateExpired = 3 UserAddressModelTable = "user_address" DefaultCountry = "中国" DefaultCountryId = 48 )
const ( UserTable = "users" GenderUnknown = 0 // 未知 GenderMan = 1 // 男 GenderWoman = 2 // 女 GenderSecrecy = 3 // 保密 GenderBoth = 4 // 中间人 GenderSecrecyKey = "secrecy" GenderUnknownKey = "default" GenderManKey = "man" GenderWomanKey = "woman" GenderBothKey = "both" UserStatusOk = 1 // 正常 UserStatusForbid = 2 // 禁用 UserStatusBack = -1 // 拉黑 )
const ( UserRelationTable = "user_relations" // 表名 TargetTypeFriend = "friend" // 朋友关系 StatusUnKnown = 0 // 状态 初始化 StatusOk = 1 // 状态 正常 StatusCancel = 2 // 状态 取消 )
const ( UserRootRole = 7 UserRoleTypeTableName = "user_roles_config" )
const (
AuditLogTable = "audit_logs"
)
const (
MessageLogTable = "message_log"
)
const (
MessageTemplateModelTableName = "message_template"
)
const (
PopularizationChannelsTable = "popularization_channels"
)
const (
RequestLogTableName = "request_logs"
)
const (
TagModelTableName = "tags"
)
const (
ThumbsUpTable = "thumbs_up"
)
const (
UserFocusTable = "user_focus"
)
const (
UserLoginLogTable = "user_login_log"
)
Variables ¶
var ( ErrFileNotExists = errors.New("file not exists") ErrEmptyInclude = errors.New("empty include json") ErrEmptyJson = errors.New("empty json object") ErrUnSupportJson = errors.New("unSupport json struct") )
var ( ApplyTypes = []string{ ApplyTypeReport, ApplyTypeSuggest, ApplyTypeAllege, } ApplyStatusDesc = map[int]string{ ApplyStatusWait: "待处理", ApplyStatusPassed: "处理完毕", ApplyStatusDealing: "处理中", ApplyStatusReject: "拒绝处理", } )
var ( // AttachmentTypes 类型列表 AttachmentTypes = []string{ AttachTypeImage, AttachTypeImageAvatar, AttachTypeDoc, AttachTypeText, AttachTypeVideo, AttachTypeAudio, } // AttachmentTypesMatcher 类型匹配器 AttachmentTypesMatcher = []*StrArrayEntry{ {AttachTypeImage, StrArray{".png", ".jpg", ".gif", ".bmp", ".webp", ".svg"}}, {AttachTypeImageAvatar, StrArray{".png", ".jpg"}}, {AttachTypeDoc, StrArray{".doc", ".docx", ".pdf", ".ppt", ".pptx", ".xsl", ".xslx", ".mmap", ".xmind"}}, {AttachTypeText, StrArray{".txt", ".ini", ".yml", ".yaml", ".toml", ".xml", ".json", ".conf", ".env", ".sh", ".cmd", ".ps1", ".gitignore"}}, {AttachTypeVideo, StrArray{".mp4"}}, {AttachTypeAudio, StrArray{".mp3"}}, } )
var ( CommentStatusMap = map[int]string{ StatusAuditWait: "待审核", StatusAuditPass: "审核通过", StatusAuditUnPass: "审核未通过", StatusOff: "下架", } CommentTypes = []string{ CommentTargetTypeReview, CommentTargetTypeComment, } )
var ( PrivacyMapDesc = map[int]string{PublicPrivacy: "公开", OnlySelfPrivacy: "仅自己可见"} PostTypeMapDesc = map[int]string{ImageType: "图像", VideoType: "视频", ContentType: "文本", StrategyType: "攻略", PostType: "帖子"} StatusMapDesc = map[int]string{StatusAuditNotPass: "审核不通过", StatusWaitAudit: "待审核", StatusAuditOk: "审核通过", StatusAuditOff: "下架"} PostTypeMapCodes = map[int]string{ImageType: ImageTypeCode, VideoType: VideoTypeCode, ContentType: ContentTypeCode, StrategyType: StrategyTypeCode, PostType: PostTypeCode} )
var (
ErrEmptyData = errors.New("empty data call")
)
var (
ErrEmptyRequestId = errors.New("empty requestId")
)
var (
GlobalMgoSessionContainer = sync.Map{}
)
var (
MissAreaCodeError = errors.New("miss areaCode")
)
Functions ¶
func AppendQueryPostsCodesWithKey ¶
func AppendQueryPostsCodesWithKey(query map[string]interface{}, codes []string, key string) map[string]interface{}
AppendQueryPostsCodesWithKey 最近类型查询限定
func AppendQueryTypes ¶
AppendQueryTypes 追加类型限定查询
func AppendQueryTypesWithKey ¶
func AppendQueryTypesWithKey(query map[string]interface{}, codes []string, key string) map[string]interface{}
AppendQueryTypesWithKey 最近类型查询限定
func ArrayFirst ¶
func ArrayFirst(arr []interface{}) interface{}
func GenderText ¶
func GetDfaInstance ¶
func GetDfaInstance() *dfaLogic
func GetGenderEnum ¶
func GetGenderKey ¶
func GetProfile ¶
func GetProfile(key string, defaults ...interface{}) interface{}
func GetStateDesc ¶
func GetTypeCode ¶
func GetTypeDesc ¶
func GetTypeIdByDesc ¶
func IsDuplicate ¶
func IsErrCursor ¶
func IsNotFound ¶
func ParsePostTypesByCodes ¶
ParsePostTypesByCodes 解析内容类型
func SetProfile ¶
func SetProfile(key string, v interface{})
Types ¶
type Address ¶
type Address struct { Id bson.ObjectId `json:"id" bson:"_id"` // ID Level int `json:"level" bson:"level"` // 行政层级 ParentCode int64 `json:"parentCode" bson:"parentCode"` // 父级行政代码 AreaCode int64 `json:"areaCode" json:"areaCode"` // 行政代码 ZipCode string `json:"zipCode" bson:"zipCode"` // 邮政编码 CityCode string `json:"cityCode" bson:"cityCode"` // 区号 Name string `json:"name" bson:"name"` // 名称 ShortName string `json:"shortName" bson:"shortName"` // 简称 MergerName string `json:"mergerName" bson:"mergerName"` // 组合名 Pinyin string `json:"pinyin" bson:"pinyin"` // 拼音 Lng float64 `json:"lng" bson:"lng"` // 经度 Lat float64 `json:"lat" bson:"lat"` // 纬度 CreatedAt time.Time `json:"createdAt"` // 创建时间 DeletedAt int64 `json:"deletedAt" json:"deletedAt"` // 删除时间 | 废弃时间 // contains filtered or unexported fields }
Address 中国行政区域
func (*Address) AddExcludeKeys ¶
func (this *Address) AddExcludeKeys(key ...string)
AddExcludeKeys 添加排除键
func (*Address) AddFilters ¶
AddFilters 添加过滤器
func (*Address) GetFormatterTime ¶
GetFormatterTime 时间戳格式
func (*Address) GetKeysFilter ¶
GetKeysFilter 字段过滤器
func (*Address) GetTransformFilter ¶
func (this *Address) GetTransformFilter(transform func(key string, v interface{}, data *beego.M)) func(data beego.M) beego.M
GetTransformFilter 字段转换器
func (*Address) GetTransformFilterByKey ¶
func (this *Address) GetTransformFilterByKey(key string, trans func(v interface{}) interface{}) func(data beego.M) beego.M
GetTransformFilterByKey 字段转换器
func (*Address) Map ¶
func (this *Address) Map(each func(k string, v interface{}, result interface{}) interface{}, result ...interface{}) interface{}
Map 遍历
func (*Address) RemoveExcludeKeys ¶
func (this *Address) RemoveExcludeKeys(key ...string)
RemoveExcludeKeys 移除排除键
func (*Address) SetAttributes ¶
SetAttributes 设置属性值
func (*Address) SetBsonMapper ¶
SetBsonMapper bson Map 赋值
func (*Address) SetNumIntN ¶
SetNumIntN 设置数字
func (*Address) SetObjectId ¶
SetObjectId 设置objectId
func (*Address) SetProvider ¶
func (this *Address) SetProvider(name string, v interface{})
SetProvider 设置服务提供函数
func (*Address) SetSameTypeValue ¶
func (this *Address) SetSameTypeValue(obj interface{}, v interface{}) bool
SetSameTypeValue 相同类型赋值
func (*Address) SetStringArr ¶
type AddressInfo ¶
type AddressInfo struct { Address string `json:"address"` Country string `json:"country"` Province string `json:"province"` City string `json:"city"` District string `json:"district"` Street string `json:"street"` }
地址信息
func NewAddressInfo ¶
func NewAddressInfo(address string, userId string) *AddressInfo
type AddressModel ¶
type AddressModel struct {
BaseModel
}
func (*AddressModel) CreateIndex ¶
func (this *AddressModel) CreateIndex(force ...bool)
CreateIndex 创建索引
func (*AddressModel) GetAddress ¶
func (this *AddressModel) GetAddress(query map[string]interface{}) *Address
GetAddress 地址查询
func (*AddressModel) ImportFromJsonFile ¶
func (this *AddressModel) ImportFromJsonFile(file string) (int, error)
ImportFromJsonFile 通过json 倒入
type AppBaseConfig ¶
type AppBaseConfig struct { AppCode string `json:"appCode"` // 授权码 Download string `json:"download"` // 下载页面 AppHelpUrl string `json:"appHelpUrl"` // 帮助页 AppPrivacy string `json:"appPrivacy"` // 隐私条款页 AppAboutUs string `json:"appAboutUs"` // 关于我们 AppUserAgreement string `json:"appUserAgreement"` // 用户协议页 Email string `json:"email"` // 客服邮箱 QQ string `json:"QQ"` // 客服QQ WeChat string `json:"wechat"` // 微信 // contains filtered or unexported fields }
App 配置信息
func (*AppBaseConfig) AddExcludeKeys ¶
func (this *AppBaseConfig) AddExcludeKeys(key ...string)
AddExcludeKeys 添加排除键
func (*AppBaseConfig) AddFilters ¶
AddFilters 添加过滤器
func (*AppBaseConfig) GetAppAboutUs ¶
func (this *AppBaseConfig) GetAppAboutUs(drivers ...string) string
func (*AppBaseConfig) GetAppCode ¶
func (this *AppBaseConfig) GetAppCode(drivers ...string) string
获取AppCode
func (*AppBaseConfig) GetAppPrivacy ¶
func (this *AppBaseConfig) GetAppPrivacy(drivers ...string) string
func (*AppBaseConfig) GetAppUserAgreement ¶
func (this *AppBaseConfig) GetAppUserAgreement(drivers ...string) string
func (*AppBaseConfig) GetDownloadUrl ¶
func (this *AppBaseConfig) GetDownloadUrl(drivers ...string) string
func (*AppBaseConfig) GetFormatterTime ¶
GetFormatterTime 时间戳格式
func (*AppBaseConfig) GetHelpUrl ¶
func (this *AppBaseConfig) GetHelpUrl(drivers ...string) string
func (*AppBaseConfig) GetKeysFilter ¶
func (this *AppBaseConfig) GetKeysFilter(keys []string, excludes ...bool) func(data beego.M) beego.M
GetKeysFilter 字段过滤器
func (*AppBaseConfig) GetMail ¶
func (this *AppBaseConfig) GetMail(drivers ...string) string
func (*AppBaseConfig) GetQQ ¶
func (this *AppBaseConfig) GetQQ(drivers ...string) string
func (*AppBaseConfig) GetTransformFilter ¶
func (this *AppBaseConfig) GetTransformFilter(transform func(key string, v interface{}, data *beego.M)) func(data beego.M) beego.M
GetTransformFilter 字段转换器
func (*AppBaseConfig) GetTransformFilterByKey ¶
func (this *AppBaseConfig) GetTransformFilterByKey(key string, trans func(v interface{}) interface{}) func(data beego.M) beego.M
GetTransformFilterByKey 字段转换器
func (*AppBaseConfig) GetWeChat ¶
func (this *AppBaseConfig) GetWeChat(drivers ...string) string
func (*AppBaseConfig) Init ¶
func (this *AppBaseConfig) Init()
func (*AppBaseConfig) Load ¶
func (this *AppBaseConfig) Load(driver ...string) *AppBaseConfig
func (*AppBaseConfig) Map ¶
func (this *AppBaseConfig) Map(each func(k string, v interface{}, result interface{}) interface{}, result ...interface{}) interface{}
Map 遍历
func (*AppBaseConfig) RemoveExcludeKeys ¶
func (this *AppBaseConfig) RemoveExcludeKeys(key ...string)
RemoveExcludeKeys 移除排除键
func (*AppBaseConfig) Set ¶
func (this *AppBaseConfig) Set(key string, v interface{}) *AppBaseConfig
func (*AppBaseConfig) SetAttributes ¶
SetAttributes 设置属性值
func (*AppBaseConfig) SetBsonMapper ¶
SetBsonMapper bson Map 赋值
func (*AppBaseConfig) SetNumIntN ¶
SetNumIntN 设置数字
func (*AppBaseConfig) SetObjectId ¶
SetObjectId 设置objectId
func (*AppBaseConfig) SetProvider ¶
func (this *AppBaseConfig) SetProvider(name string, v interface{})
SetProvider 设置服务提供函数
func (*AppBaseConfig) SetSameTypeValue ¶
func (this *AppBaseConfig) SetSameTypeValue(obj interface{}, v interface{}) bool
SetSameTypeValue 相同类型赋值
func (*AppBaseConfig) SetStringArr ¶
type AppInfo ¶
type AppInfo struct { Id bson.ObjectId `json:"id" bson:"_id"` // ID Driver string `json:"driver" bson:"driver"` // 设备类型 ios,android,win Download string `json:"download" bson:"download"` // 下载链接 Version string `json:"version" bson:"version"` // 版本号 Content string `json:"content" bson:"content"` // 更新内容 ForcedUpdate bool `json:"state" bson:"forcedUpdate"` // 是否强制更新 PublishTime int64 `json:"publishTime" bson:"publishTime"` // 版本发布时间 Remark string `json:"remark" bson:"remark"` // 备注 AppName string `json:"appName" bson:"appName"` // 应用名 AppBuild int `json:"appBuild" bson:"appBuild"` // 构建版本数字版本 CreatedAt time.Time `json:"createdAt" bson:"createdAt"` // 创建时间 // contains filtered or unexported fields }
AppInfo app Built 信息模型
func NewAppInfo ¶
func NewAppInfo() *AppInfo
func (*AppInfo) AddExcludeKeys ¶
func (this *AppInfo) AddExcludeKeys(key ...string)
AddExcludeKeys 添加排除键
func (*AppInfo) AddFilters ¶
AddFilters 添加过滤器
func (*AppInfo) GetAppBuild ¶
func (*AppInfo) GetAppName ¶
func (*AppInfo) GetDownloadUrl ¶
func (*AppInfo) GetFormatterTime ¶
GetFormatterTime 时间戳格式
func (*AppInfo) GetKeysFilter ¶
GetKeysFilter 字段过滤器
func (*AppInfo) GetTransformFilter ¶
func (this *AppInfo) GetTransformFilter(transform func(key string, v interface{}, data *beego.M)) func(data beego.M) beego.M
GetTransformFilter 字段转换器
func (*AppInfo) GetTransformFilterByKey ¶
func (this *AppInfo) GetTransformFilterByKey(key string, trans func(v interface{}) interface{}) func(data beego.M) beego.M
GetTransformFilterByKey 字段转换器
func (*AppInfo) Map ¶
func (this *AppInfo) Map(each func(k string, v interface{}, result interface{}) interface{}, result ...interface{}) interface{}
Map 遍历
func (*AppInfo) RemoveExcludeKeys ¶
func (this *AppInfo) RemoveExcludeKeys(key ...string)
RemoveExcludeKeys 移除排除键
func (*AppInfo) SetAttributes ¶
SetAttributes 设置属性值
func (*AppInfo) SetBsonMapper ¶
SetBsonMapper bson Map 赋值
func (*AppInfo) SetNumIntN ¶
SetNumIntN 设置数字
func (*AppInfo) SetObjectId ¶
SetObjectId 设置objectId
func (*AppInfo) SetProvider ¶
func (this *AppInfo) SetProvider(name string, v interface{})
SetProvider 设置服务提供函数
func (*AppInfo) SetSameTypeValue ¶
func (this *AppInfo) SetSameTypeValue(obj interface{}, v interface{}) bool
SetSameTypeValue 相同类型赋值
func (*AppInfo) SetStringArr ¶
type AppModel ¶
type AppModel struct {
BaseModel
}
func AppModelOf ¶
func AppModelOf() *AppModel
func (*AppModel) GetAppDownloadUrl ¶
获取最新版本号
func (*AppModel) GetByUnique ¶
通过唯一索引查询
type ApplyInfo ¶
type ApplyInfo struct { Id bson.ObjectId `json:"id" bson:"_id"` // 工单ID Title string `json:"title" bson:"title"` // 标题 UserId string `json:"userId" bson:"userId"` // 申请|举报人 Type string `json:"type" bson:"type"` // 类型 Target string `json:"target" bson:"target"` // 举报|申请目标 | mobile Images []string `json:"images" bson:"images"` // 图片集合 Status int `json:"status" bson:"status"` // 状态 Content string `json:"content" bson:"content"` // 内容 Extras beego.M `json:"extras" bson:"extras"` // 扩展 Date int64 `json:"date" bson:"date"` // 日期 UpdatedAt time.Time `json:"updatedAt" bson:"updatedAt"` // 更新时间 CreatedAt time.Time `json:"createdAt" bson:"createdAt"` // 创建时间 // contains filtered or unexported fields }
工单 (申请|举报) 记录
func NewApplyInfo ¶
func NewApplyInfo() *ApplyInfo
func (*ApplyInfo) AddExcludeKeys ¶
func (this *ApplyInfo) AddExcludeKeys(key ...string)
AddExcludeKeys 添加排除键
func (*ApplyInfo) AddFilters ¶
AddFilters 添加过滤器
func (*ApplyInfo) AppendImages ¶
验证图片是否可用
func (*ApplyInfo) GetFormatterTime ¶
GetFormatterTime 时间戳格式
func (*ApplyInfo) GetKeysFilter ¶
GetKeysFilter 字段过滤器
func (*ApplyInfo) GetTransformFilter ¶
func (this *ApplyInfo) GetTransformFilter(transform func(key string, v interface{}, data *beego.M)) func(data beego.M) beego.M
GetTransformFilter 字段转换器
func (*ApplyInfo) GetTransformFilterByKey ¶
func (this *ApplyInfo) GetTransformFilterByKey(key string, trans func(v interface{}) interface{}) func(data beego.M) beego.M
GetTransformFilterByKey 字段转换器
func (*ApplyInfo) Map ¶
func (this *ApplyInfo) Map(each func(k string, v interface{}, result interface{}) interface{}, result ...interface{}) interface{}
Map 遍历
func (*ApplyInfo) RemoveExcludeKeys ¶
func (this *ApplyInfo) RemoveExcludeKeys(key ...string)
RemoveExcludeKeys 移除排除键
func (*ApplyInfo) SetAttributes ¶
SetAttributes 设置属性值
func (*ApplyInfo) SetBsonMapper ¶
SetBsonMapper bson Map 赋值
func (*ApplyInfo) SetNumIntN ¶
SetNumIntN 设置数字
func (*ApplyInfo) SetObjectId ¶
SetObjectId 设置objectId
func (*ApplyInfo) SetProvider ¶
func (this *ApplyInfo) SetProvider(name string, v interface{})
SetProvider 设置服务提供函数
func (*ApplyInfo) SetSameTypeValue ¶
func (this *ApplyInfo) SetSameTypeValue(obj interface{}, v interface{}) bool
SetSameTypeValue 相同类型赋值
func (*ApplyInfo) SetStringArr ¶
type ApplyInfoModel ¶
type ApplyInfoModel struct {
BaseModel
}
func ApplyInfoModelOf ¶
func ApplyInfoModelOf() *ApplyInfoModel
func (*ApplyInfoModel) CreateIndex ¶
func (this *ApplyInfoModel) CreateIndex(force ...bool)
func (*ApplyInfoModel) GetByUnique ¶
func (this *ApplyInfoModel) GetByUnique(m beego.M) *ApplyInfo
func (*ApplyInfoModel) TableName ¶
func (this *ApplyInfoModel) TableName() string
type Attachment ¶
type Attachment struct { Id bson.ObjectId `json:"id" bson:"_id"` // id media_id FileName string `json:"filename" bson:"filename"` // 文件名 Hash string `json:"hash" bson:"hash"` // 文件hash值 Ticket string `json:"ticket" bson:"ticket"` // 文件上传时的密钥 AppId string `json:"appId" bson:"appId"` // 文件上传的应用 UserId bson.ObjectId `json:"userId,omitempty" bson:"userId,omitempty"` // 文件上传用户 ExtrasInfo bson.M `json:"extrasInfo,omitempty" bson:"extrasInfo,omitempty"` // 文件扩展信息 Tags []string `json:"tags,omitempty" bson:"tags,omitempty"` // 文件标签 Url string `json:"url" bson:"url"` // 远程访问链接 Cdn string `json:"cdn,omitempty" bson:"cdn,omitempty"` // cdn 服务名 CdnUrl string `json:"cdnUrl,omitempty" bson:"cdnUrl,omitempty"` // cdn访问链接 OssBucket string `json:"ossBucket,omitempty" bson:"ossBucket,omitempty"` // oss bucket Oss string `json:"oss,omitempty" bson:"oss,omitempty"` // oss 服务名 AccessTimes int64 `json:"accessTimes,omitempty" bson:"accessTimes,omitempty"` // 被访问次数 DownloadTimes int64 `json:"downloadTimes,omitempty" bson:"downloadTimes,omitempty"` // 被下载次数 Path string `json:"path" bson:"path"` // 系统本地存储路径 ReferName string `json:"referName" bson:"referName"` // 记录涉及的document名 ReferId string `json:"referId" bson:"referId"` // 记录涉及的document的ID Size int64 `json:"size" bson:"size"` // 文件大小 单位: byte SizeText string `json:"sizeText" bson:"sizeText"` // 带单的文件大小 eg: ..1G,120MB,1KB,1B,1byte FileType string `json:"fileType" bson:"fileType"` // 文件类型 [doc,image,avatar,mp4,mp3,txt....] Status int `json:"status" bson:"status"` // 文件状态 [1,2,3] Privately bool `json:"privately" bson:"privately"` // 文件是否私有 Watermark bool `json:"watermark" bson:"watermark"` // 文件是否有水印 UpdatedAt time.Time `json:"updatedAt" bson:"updatedAt"` // 记录更新时间 Duration time.Duration `json:"duration,omitempty" bson:"duration,omitempty"` // 音视频文件时长 CoverId bson.ObjectId `json:"coverId,omitempty" bson:"coverId,omitempty"` // 音视频文件封面 Width int `json:"width,omitempty" bson:"width,omitempty"` // 图片文件时宽 Height int `json:"height,omitempty" bson:"height,omitempty"` // 图片文件时高 CreatedAt time.Time `json:"createdAt" bson:"createdAt"` // 创建时间 DeletedAt int64 `json:"deletedAt" bson:"deletedAt"` // 删除时间 }
附件模型
func NewAttachment ¶
func NewAttachment() *Attachment
func (*Attachment) AutoType ¶
func (this *Attachment) AutoType() *Attachment
func (*Attachment) CertificateUrl ¶
func (this *Attachment) CertificateUrl(url string, expire ...int64) string
获取认证访问的url
func (*Attachment) CheckType ¶
func (this *Attachment) CheckType() bool
func (*Attachment) Defaults ¶
func (this *Attachment) Defaults() *Attachment
func (*Attachment) GetBase ¶
func (this *Attachment) GetBase(seps ...string) string
func (*Attachment) GetCoverInfo ¶
func (this *Attachment) GetCoverInfo(id bson.ObjectId) *Attachment
func (*Attachment) GetLocal ¶
func (this *Attachment) GetLocal() string
func (*Attachment) GetUrl ¶
func (this *Attachment) GetUrl() string
func (*Attachment) Image ¶
func (this *Attachment) Image() *Image
func (*Attachment) Load ¶
func (this *Attachment) Load(data map[string]interface{}) *Attachment
func (*Attachment) Video ¶
func (this *Attachment) Video() *Video
type AttachmentModel ¶
type AttachmentModel struct {
BaseModel
}
func AttachmentModelOf ¶
func AttachmentModelOf() *AttachmentModel
func (*AttachmentModel) CreateIndex ¶
func (this *AttachmentModel) CreateIndex(force ...bool)
func (*AttachmentModel) GetByMediaId ¶
func (this *AttachmentModel) GetByMediaId(id string) (*Attachment, error)
func (*AttachmentModel) GetImageById ¶
func (this *AttachmentModel) GetImageById(id string) *Image
GetImageById 获取图片
func (*AttachmentModel) GetVideoById ¶
func (this *AttachmentModel) GetVideoById(id string) *Video
GetVideoById 获取视频对象
func (*AttachmentModel) ImageOk ¶
func (this *AttachmentModel) ImageOk(id string) bool
ImageOk 图片是否可用
func (*AttachmentModel) TableName ¶
func (this *AttachmentModel) TableName() string
func (*AttachmentModel) TypeMediaOk ¶
func (this *AttachmentModel) TypeMediaOk(id string, ty string) bool
TypeMediaOk 类型文件是存在
func (*AttachmentModel) VideoOk ¶
func (this *AttachmentModel) VideoOk(id string) bool
VideoOk 视频是否可用
type AuditLog ¶
type AuditLog struct { Id bson.ObjectId `json:"id" bson:"_id"` // ID UserId string `json:"userId" json:"userId"` // 审核用户ID Platform int `json:"platform" bson:"platform"` // 审核端 [1:ios,2,android,3,pc] PostId string `json:"postId" bson:"postId"` // 文件ID AuditType string `json:"auditType" bson:"auditType"` // 类型 Comment string `json:"comment" bson:"comment"` // 备注 UpdatedAt time.Time `json:"updatedAt" bson:"updatedAt"` // 更新时间时间 CreatedAt time.Time `json:"createdAt" bson:"createdAt"` // 创建时间 // contains filtered or unexported fields }
审核日志
func NewAuditLog ¶
func NewAuditLog() *AuditLog
func (*AuditLog) AddExcludeKeys ¶
func (this *AuditLog) AddExcludeKeys(key ...string)
AddExcludeKeys 添加排除键
func (*AuditLog) AddFilters ¶
AddFilters 添加过滤器
func (*AuditLog) GetFormatterTime ¶
GetFormatterTime 时间戳格式
func (*AuditLog) GetKeysFilter ¶
GetKeysFilter 字段过滤器
func (*AuditLog) GetTransformFilter ¶
func (this *AuditLog) GetTransformFilter(transform func(key string, v interface{}, data *beego.M)) func(data beego.M) beego.M
GetTransformFilter 字段转换器
func (*AuditLog) GetTransformFilterByKey ¶
func (this *AuditLog) GetTransformFilterByKey(key string, trans func(v interface{}) interface{}) func(data beego.M) beego.M
GetTransformFilterByKey 字段转换器
func (*AuditLog) Map ¶
func (this *AuditLog) Map(each func(k string, v interface{}, result interface{}) interface{}, result ...interface{}) interface{}
Map 遍历
func (*AuditLog) RemoveExcludeKeys ¶
func (this *AuditLog) RemoveExcludeKeys(key ...string)
RemoveExcludeKeys 移除排除键
func (*AuditLog) SetAttributes ¶
SetAttributes 设置属性值
func (*AuditLog) SetBsonMapper ¶
SetBsonMapper bson Map 赋值
func (*AuditLog) SetNumIntN ¶
SetNumIntN 设置数字
func (*AuditLog) SetObjectId ¶
SetObjectId 设置objectId
func (*AuditLog) SetProvider ¶
func (this *AuditLog) SetProvider(name string, v interface{})
SetProvider 设置服务提供函数
func (*AuditLog) SetSameTypeValue ¶
func (this *AuditLog) SetSameTypeValue(obj interface{}, v interface{}) bool
SetSameTypeValue 相同类型赋值
func (*AuditLog) SetStringArr ¶
type AuditLogModel ¶
type AuditLogModel struct {
BaseModel
}
func AuditLogModelOf ¶
func AuditLogModelOf() *AuditLogModel
func (*AuditLogModel) CreateIndex ¶
func (this *AuditLogModel) CreateIndex(force ...bool)
func (*AuditLogModel) GetByUnique ¶
func (this *AuditLogModel) GetByUnique(m beego.M) *AuditLog
func (*AuditLogModel) TableName ¶
func (this *AuditLogModel) TableName() string
type AuthModel ¶
type AuthModel struct {
BaseModel
}
func AuthModelOf ¶
func AuthModelOf() *AuthModel
type AwardWay ¶
type AwardWay struct { Name string `json:"name" bson:"name"` Config bson.M `json:"config" bson:"config"` }
奖励方式 | 结算方式
type BaseModel ¶
type BaseModel struct { Err error // contains filtered or unexported fields }
func (*BaseModel) AddScopeQuery ¶
AddScopeQuery 添加局部查询
func (*BaseModel) Collection ¶
func (this *BaseModel) Collection(doc ...string) *mgo.Collection
func (*BaseModel) Deletes ¶
func (this *BaseModel) Deletes(query interface{}, softDelete ...bool) (*mgo.ChangeInfo, error)
func (*BaseModel) Document ¶
func (this *BaseModel) Document() *mgo.Collection
func (*BaseModel) GetByObjectId ¶
func (*BaseModel) GetDatabaseName ¶
func (*BaseModel) GetProfile ¶
func (*BaseModel) IsDuplicate ¶
IsDuplicate 是重复异常
func (*BaseModel) Lists ¶
func (this *BaseModel) Lists(query interface{}, result interface{}, limit ListsParams, selects ...interface{}) (int, error)
func (*BaseModel) ListsQuery ¶
func (this *BaseModel) ListsQuery(query interface{}, limit ListsParams, selects ...interface{}) *mgo.Query
func (*BaseModel) SetProfile ¶
func (*BaseModel) Sum ¶
Sum 计算和 [
'$match' => $map], [ '$group' => [ '_id' => null, 'total_money' => ['$sum' => '$money'], 'total_money_usd' => ['$sum' => '$money_usd'] ]
]
func (*BaseModel) Txn ¶
Txn 执行事务 示例:
ops := []txn.Op{{ C: "accounts", Id: "aram", Assert: bson.M{"balance": bson.M{"$gte": 100}}, Update: M{"$inc": M{"balance": -100}}, }, { C: "accounts", Id: "ben", Assert: M{"valid": true}, Update: M{"$inc": M{"balance": 100}}, }} runner.Run(ops, id, nil)
func (*BaseModel) UpdateById ¶
func (*BaseModel) Updates ¶
func (this *BaseModel) Updates(query interface{}, data interface{}) (*mgo.ChangeInfo, error)
func (*BaseModel) UseScopeQuery ¶
UseScopeQuery 使用局部查询
func (*BaseModel) UseSoftDelete ¶
UseSoftDelete 使用软删除查询
func (*BaseModel) WrapperScopeQuery ¶
func (this *BaseModel) WrapperScopeQuery(query interface{}) interface{}
WrapperScopeQuery 查询作用域
type CaptchaModel ¶
type CaptchaModel struct {
BaseModel
}
func CaptchaModelOf ¶
func CaptchaModelOf() *CaptchaModel
type ClassifyModel ¶
type ClassifyModel struct {
BaseModel
}
func ClassifyModelOf ¶
func ClassifyModelOf() *ClassifyModel
type Collect ¶
type Collect struct { Id bson.ObjectId `json:"id" bson:"_id"` // ID UserId string `json:"userId" bson:"userId"` // 用户ID TargetId string `json:"targetId" bson:"targetId"` // 收藏目标ID TargetType string `json:"targetType" bson:"targetType"` // 收藏类型 Status int `json:"status" bson:"status"` // 状态 Versions []string `json:"versions" bson:"versions"` // 状态版本变化历史 CreatedAt time.Time `json:"createdAt" bson:"createdAt"` // 创建时间 UpdatedAt time.Time `json:"updatedAt" bson:"updatedAt"` // 更新时间 DeletedAt int64 `json:"deletedAt" bson:"deletedAt"` // 删除时间 // contains filtered or unexported fields }
Collect 收藏记录
func NewCollect ¶
func NewCollect() *Collect
func (*Collect) AddExcludeKeys ¶
func (this *Collect) AddExcludeKeys(key ...string)
AddExcludeKeys 添加排除键
func (*Collect) AddFilters ¶
AddFilters 添加过滤器
func (*Collect) GetFormatterTime ¶
GetFormatterTime 时间戳格式
func (*Collect) GetKeysFilter ¶
GetKeysFilter 字段过滤器
func (*Collect) GetTransformFilter ¶
func (this *Collect) GetTransformFilter(transform func(key string, v interface{}, data *beego.M)) func(data beego.M) beego.M
GetTransformFilter 字段转换器
func (*Collect) GetTransformFilterByKey ¶
func (this *Collect) GetTransformFilterByKey(key string, trans func(v interface{}) interface{}) func(data beego.M) beego.M
GetTransformFilterByKey 字段转换器
func (*Collect) Map ¶
func (this *Collect) Map(each func(k string, v interface{}, result interface{}) interface{}, result ...interface{}) interface{}
Map 遍历
func (*Collect) RemoveExcludeKeys ¶
func (this *Collect) RemoveExcludeKeys(key ...string)
RemoveExcludeKeys 移除排除键
func (*Collect) SetAttributes ¶
SetAttributes 设置属性值
func (*Collect) SetBsonMapper ¶
SetBsonMapper bson Map 赋值
func (*Collect) SetNumIntN ¶
SetNumIntN 设置数字
func (*Collect) SetObjectId ¶
SetObjectId 设置objectId
func (*Collect) SetProvider ¶
func (this *Collect) SetProvider(name string, v interface{})
SetProvider 设置服务提供函数
func (*Collect) SetSameTypeValue ¶
func (this *Collect) SetSameTypeValue(obj interface{}, v interface{}) bool
SetSameTypeValue 相同类型赋值
func (*Collect) SetStringArr ¶
type CollectModel ¶
type CollectModel struct {
BaseModel
}
CollectModel 收藏记录model
func CollectModelOf ¶
func CollectModelOf() *CollectModel
func (*CollectModel) CreateIndex ¶
func (this *CollectModel) CreateIndex(force ...bool)
func (*CollectModel) GetByUnique ¶
func (this *CollectModel) GetByUnique(m beego.M) *Collect
func (*CollectModel) GetTravelNote ¶
func (this *CollectModel) GetTravelNote(id string) *TravelNotes
func (*CollectModel) GetTravelNotesByIds ¶
func (this *CollectModel) GetTravelNotesByIds(ids []string) []*TravelNotes
func (*CollectModel) TableName ¶
func (this *CollectModel) TableName() string
type Comment ¶
type Comment struct { Id bson.ObjectId `json:"id" bson:"_id"` // ID UserId string `json:"userId" bson:"userId"` // 评论人 Content string `json:"content" bson:"content"` // 评论内容 TargetId string `json:"targetId" bson:"targetId"` // 评论目标ID TargetType string `json:"targetType" bson:"targetType"` // 评论类型 Status int `json:"status" bson:"status"` // 审核状态 RefersIds []string `json:"refersIds,omitempty" bson:"refersIds,omitempty"` // 涉及ID ThumbsUpNum int64 `json:"thumbsUpNum" bson:"thumbsUpNum"` // 评论点赞数 ReviewNum int64 `json:"reviewNum" bson:"reviewNum"` // 评论回复数量 Sort int64 `json:"sort" bson:"sort"` // 排序 Tags []string `json:"tags" bson:"tags"` // 评论标签 CreatedAt time.Time `json:"createdAt" bson:"createdAt"` // 评论时间 UpdatedAt time.Time `json:"updatedAt" bson:"updatedAt"` // 更新时间 DeletedAt int64 `json:"deletedAt" bson:"deletedAt"` // 删除时间戳 // contains filtered or unexported fields }
Comment 评论数据
func NewComment ¶
func NewComment() *Comment
func (*Comment) AddExcludeKeys ¶
func (this *Comment) AddExcludeKeys(key ...string)
AddExcludeKeys 添加排除键
func (*Comment) AddFilters ¶
AddFilters 添加过滤器
func (*Comment) GetFormatterTime ¶
GetFormatterTime 时间戳格式
func (*Comment) GetKeysFilter ¶
GetKeysFilter 字段过滤器
func (*Comment) GetStatusText ¶
func (*Comment) GetTransformFilter ¶
func (this *Comment) GetTransformFilter(transform func(key string, v interface{}, data *beego.M)) func(data beego.M) beego.M
GetTransformFilter 字段转换器
func (*Comment) GetTransformFilterByKey ¶
func (this *Comment) GetTransformFilterByKey(key string, trans func(v interface{}) interface{}) func(data beego.M) beego.M
GetTransformFilterByKey 字段转换器
func (*Comment) Map ¶
func (this *Comment) Map(each func(k string, v interface{}, result interface{}) interface{}, result ...interface{}) interface{}
Map 遍历
func (*Comment) RemoveExcludeKeys ¶
func (this *Comment) RemoveExcludeKeys(key ...string)
RemoveExcludeKeys 移除排除键
func (*Comment) SetAttributes ¶
SetAttributes 设置属性值
func (*Comment) SetBsonMapper ¶
SetBsonMapper bson Map 赋值
func (*Comment) SetNumIntN ¶
SetNumIntN 设置数字
func (*Comment) SetObjectId ¶
SetObjectId 设置objectId
func (*Comment) SetProvider ¶
func (this *Comment) SetProvider(name string, v interface{})
SetProvider 设置服务提供函数
func (*Comment) SetSameTypeValue ¶
func (this *Comment) SetSameTypeValue(obj interface{}, v interface{}) bool
SetSameTypeValue 相同类型赋值
func (*Comment) SetStringArr ¶
type CommentModel ¶
type CommentModel struct {
BaseModel
}
func CommentModelOf ¶
func CommentModelOf() *CommentModel
func (*CommentModel) CreateIndex ¶
func (this *CommentModel) CreateIndex(force ...bool)
func (*CommentModel) TableName ¶
func (this *CommentModel) TableName() string
type Config ¶
type Config struct { Id bson.ObjectId `json:"id" bson:"_id"` // ID Key string `json:"key" bson:"key"` // 键名 Value interface{} `json:"value" json:"value"` // 值 Root string `json:"root" bson:"root"` // 分组 State int `json:"state" bson:"state"` // 状态 Title string `json:"title" bson:"title"` // 备注 UpdatedAt time.Time `json:"updatedAt" bson:"updatedAt"` // 更新时间 CreatedAt time.Time `json:"createdAt" bson:"createdAt"` // 创建时间 // contains filtered or unexported fields }
func (*Config) AddExcludeKeys ¶
func (this *Config) AddExcludeKeys(key ...string)
AddExcludeKeys 添加排除键
func (*Config) AddFilters ¶
AddFilters 添加过滤器
func (*Config) GetFormatterTime ¶
GetFormatterTime 时间戳格式
func (*Config) GetKeysFilter ¶
GetKeysFilter 字段过滤器
func (*Config) GetTransformFilter ¶
func (this *Config) GetTransformFilter(transform func(key string, v interface{}, data *beego.M)) func(data beego.M) beego.M
GetTransformFilter 字段转换器
func (*Config) GetTransformFilterByKey ¶
func (this *Config) GetTransformFilterByKey(key string, trans func(v interface{}) interface{}) func(data beego.M) beego.M
GetTransformFilterByKey 字段转换器
func (*Config) Map ¶
func (this *Config) Map(each func(k string, v interface{}, result interface{}) interface{}, result ...interface{}) interface{}
Map 遍历
func (*Config) RemoveExcludeKeys ¶
func (this *Config) RemoveExcludeKeys(key ...string)
RemoveExcludeKeys 移除排除键
func (*Config) SetAttributes ¶
SetAttributes 设置属性值
func (*Config) SetBsonMapper ¶
SetBsonMapper bson Map 赋值
func (*Config) SetNumIntN ¶
SetNumIntN 设置数字
func (*Config) SetObjectId ¶
SetObjectId 设置objectId
func (*Config) SetProvider ¶
func (this *Config) SetProvider(name string, v interface{})
SetProvider 设置服务提供函数
func (*Config) SetSameTypeValue ¶
func (this *Config) SetSameTypeValue(obj interface{}, v interface{}) bool
SetSameTypeValue 相同类型赋值
func (*Config) SetStringArr ¶
type ConfigModel ¶
type ConfigModel struct {
BaseModel
}
func (*ConfigModel) Get ¶
func (this *ConfigModel) Get(key string, scope string, state ...int) *Config
获取
func (*ConfigModel) GetBool ¶
func (this *ConfigModel) GetBool(key string, scope ...string) bool
获取字符串配置
func (*ConfigModel) GetByUnique ¶
func (this *ConfigModel) GetByUnique(data map[string]interface{}, state ...int) *Config
通过唯一条件查询
func (*ConfigModel) GetItemsByScope ¶
func (this *ConfigModel) GetItemsByScope(scope string, state ...int) []Config
获取对应数据配置
func (*ConfigModel) GetString ¶
func (this *ConfigModel) GetString(key string, scope ...string) string
获取字符串配置
func (*ConfigModel) Remove ¶
func (this *ConfigModel) Remove(key string, scope ...string) error
移除配置
type ConnOption ¶
type ConnOption struct { Db string `json:"db"` // 数据库 Server string `json:"server"` // 配置类型 Document string `json:"table"` // 表,文档 }
ConnOption 配置
type DataClass ¶
type DataClass interface { Save() error InitDefault() Keys() []string Values() []interface{} Excludes(string) bool AddExcludeKeys(...string) RemoveExcludeKeys(...string) SetProvider(name string, v interface{}) M(filter ...func(m beego.M) beego.M) beego.M AddFilters(filters ...func(m beego.M) beego.M) SetAttributes(m map[string]interface{}, safe ...bool) }
type DiscoverModel ¶
type DiscoverModel struct {
BaseModel
}
func DiscoverModelOf ¶
func DiscoverModelOf() *DiscoverModel
func (*DiscoverModel) Get ¶
func (this *DiscoverModel) Get()
type FullListsParams ¶
type FullListsParams interface { ListsParams OrderByParam }
type HeaderSchema ¶
type HeaderSchema struct { AppVersion string `json:"appVer" bson:"appVer"` // app 版本 eg: 1.0.0 [0000.00.00] Driver string `json:"driver" bson:"driver"` // 设备类型 [ios,android,winPhone,win,mac,linux] Location string `json:"location,omitempty" bson:"location,omitempty"` // 定位信息 eg: 中国-广东-广州-天河 Lng float64 `json:"lng,omitempty" bson:"lng,omitempty"` // 定位经度 Lat float64 `json:"lat,omitempty" bson:"lat,omitempty"` // 定位纬度 AppId string `json:"appId" bson:"appId"` // appId | android-client:0,ios-client:1,pc:2 Signature string `json:"sign" bson:"signature" ` // 参数签名 Lang string `json:"lang" bson:"lang" ` // 语言 eg: 中文简体:zh-CN,中文繁体:zh-TW,英语:en, 马来语: my Country string `json:"country" bson:"country"` // 国家简码 ,eg:CN UserOpenId string `json:"userOpenId" json:"userOpenId"` // 设备 uuid | 用户临时访问身份 TimeStamp int64 `json:"timestamp" bson:"timestamp"` // 访问时间戳 Auth string `json:"authorization" bson:"authorization"` // 用户登陆token LaunchLink string `json:"launchLink" bson:"launchLink"` // 启动页路由|引导开发链接|推广链接 Code string `json:"code,omitempty" bson:"code,omitempty"` // 追踪码|活动码 From string `json:"from,omitempty" bson:"from,omitempty"` // 来源 0-分享 1-pc 2-h5 3-android 4-ios Tags string `json:"tags,omitempty" bson:"tags,omitempty"` // tags eg: Travel RequestId string `json:"requestId,omitempty" bson:"requestId,omitempty"` // 请求ID Crypto string `json:"X-Crypto,omitempty" bson:"crypto"` // 通信加密方式 UserAgent string `json:"User-Agent" json:"userAgent"` // http client user-agent Method string `json:":method" bson:"method"` // 请求方法 Authority string `json:":authority,omitempty" json:"authority,omitempty"` // 请求域 Path string `json:":path,omitempty" bson:"path,omitempty"` // 请求接口Path ClientIpAddr string `json:"X-Forwarded-For,omitempty" bson:"clientIpAddr,omitempty"` // 请求ip RealIp string `json:"X-Real-Ip" bson:"realIp"` // 请求ip RemoteAddr string `json:"Remote-Address,omitempty" json:"remoteAddr,omitempty"` // 远程请求ip ContentType string `json:"Content-Type" bson:"contentType"` // 请求数据格式 Scheme string `json:":scheme" bson:"scheme"` // 请求 schema [http,https] // contains filtered or unexported fields }
HeaderSchema 请求头部
func NewHeaderSchema ¶
func NewHeaderSchema() *HeaderSchema
func (*HeaderSchema) AddExcludeKeys ¶
func (this *HeaderSchema) AddExcludeKeys(key ...string)
AddExcludeKeys 添加排除键
func (*HeaderSchema) AddFilters ¶
AddFilters 添加过滤器
func (*HeaderSchema) GetFormatterTime ¶
GetFormatterTime 时间戳格式
func (*HeaderSchema) GetKeysFilter ¶
GetKeysFilter 字段过滤器
func (*HeaderSchema) GetTransformFilter ¶
func (this *HeaderSchema) GetTransformFilter(transform func(key string, v interface{}, data *beego.M)) func(data beego.M) beego.M
GetTransformFilter 字段转换器
func (*HeaderSchema) GetTransformFilterByKey ¶
func (this *HeaderSchema) GetTransformFilterByKey(key string, trans func(v interface{}) interface{}) func(data beego.M) beego.M
GetTransformFilterByKey 字段转换器
func (*HeaderSchema) Init ¶
func (this *HeaderSchema) Init()
func (*HeaderSchema) Map ¶
func (this *HeaderSchema) Map(each func(k string, v interface{}, result interface{}) interface{}, result ...interface{}) interface{}
Map 遍历
func (*HeaderSchema) RemoveExcludeKeys ¶
func (this *HeaderSchema) RemoveExcludeKeys(key ...string)
RemoveExcludeKeys 移除排除键
func (*HeaderSchema) Set ¶
func (this *HeaderSchema) Set(_ string, _ interface{}) *HeaderSchema
func (*HeaderSchema) SetAttributes ¶
SetAttributes 设置属性值
func (*HeaderSchema) SetBsonMapper ¶
SetBsonMapper bson Map 赋值
func (*HeaderSchema) SetNumIntN ¶
SetNumIntN 设置数字
func (*HeaderSchema) SetObjectId ¶
SetObjectId 设置objectId
func (*HeaderSchema) SetProvider ¶
func (this *HeaderSchema) SetProvider(name string, v interface{})
SetProvider 设置服务提供函数
func (*HeaderSchema) SetSameTypeValue ¶
func (this *HeaderSchema) SetSameTypeValue(obj interface{}, v interface{}) bool
SetSameTypeValue 相同类型赋值
func (*HeaderSchema) SetStringArr ¶
type Image ¶
type Image struct { MediaId string `json:"mediaId" bson:"mediaId"` // id Url string `json:"url" bson:"url"` // url Size int `json:"size" bson:"size"` // 大小 SizeText string `json:"sizeText" bson:"sizeText"` // 大小描述 Width int `json:"width" bson:"width"` // 宽 Height int `json:"height" bson:"height"` // 高 }
Image 图片
type IndexConstructor ¶
type IndexConstructor interface {
CreateIndex(force ...bool)
}
type ListParamsExtras ¶
type ListParamsExtras interface { ListsParams SetArg(string, interface{}) GetArg(string) interface{} }
type ListsParamImpl ¶
type ListsParamImpl struct {
// contains filtered or unexported fields
}
func NewListParam ¶
func NewListParam(page, size int) *ListsParamImpl
func (*ListsParamImpl) Count ¶
func (this *ListsParamImpl) Count() int
func (*ListsParamImpl) GetArg ¶
func (this *ListsParamImpl) GetArg(key string) interface{}
func (*ListsParamImpl) More ¶
func (this *ListsParamImpl) More() bool
func (*ListsParamImpl) Order ¶
func (this *ListsParamImpl) Order(key, order string)
func (*ListsParamImpl) Page ¶
func (this *ListsParamImpl) Page() int
func (*ListsParamImpl) ParseOrder ¶
func (this *ListsParamImpl) ParseOrder(query *mgo.Query)
func (*ListsParamImpl) SetArg ¶
func (this *ListsParamImpl) SetArg(key string, v interface{})
func (*ListsParamImpl) SetTotal ¶
func (this *ListsParamImpl) SetTotal(total int) ListsParams
func (*ListsParamImpl) Skip ¶
func (this *ListsParamImpl) Skip() int
type ListsParams ¶
type Location ¶
type Location struct { Longitude float64 `json:"longitude" bson:"longitude"` // 经度 [东-西] Latitude float64 `json:"latitude" bson:"latitude"` // 纬度 [南-北] }
定位
func NewLocation ¶
func (*Location) GetLatitudeDesc ¶
func (*Location) GetLongitudeDesc ¶
type Location3d ¶
3d 定位
func NewLocation3d ¶
func NewLocation3d(x, y, z float64) *Location3d
func (*Location3d) GetAltitudeDesc ¶
func (this *Location3d) GetAltitudeDesc() string
func (*Location3d) GetDesc ¶
func (this *Location3d) GetDesc() []string
func (*Location3d) Json ¶
func (this *Location3d) Json() []byte
func (*Location3d) PointZ ¶
func (this *Location3d) PointZ() float64
func (*Location3d) Points ¶
func (this *Location3d) Points() []float64
type MessageLog ¶
type MessageLog struct { Id bson.ObjectId `json:"id" bson:"id"` // 消息ID Title string `json:"title" bson:"title"` // 消息标题 Type string `json:"type" bson:"type"` // 消息类型 [register.sms,register.email,reset.sms,rebind.email,bind.sms] SenderProvider string `json:"provider" bson:"provider"` // 发送服务名 Extras bson.M `json:"extras,omitempty" bson:"extras,omitempty"` // 扩展信息 Content string `json:"content" bson:"content"` // 消息内容 SenderUserId string `json:"senderUserIdAt,omitempty" bson:"senderUserIdAt,omitempty"` // 发送人 TargetUserId string `json:"targetUserId,omitempty" bson:"targetUserId,omitempty"` // 接受人 Mobile string `json:"mobile,omitempty" bson:"mobile,omitempty"` // 手机消息手机号 Email string `json:"email,omitempty" bson:"email,omitempty"` // 邮箱信息邮箱号 State int `json:"state" bson:"state"` // 消息状态 [-3:拒绝接收,-2:发送失败,-1:待处理,0:未知,1:已发送,2:已阅读] Result string `json:"result,omitempty" bson:"result,omitempty"` // 第三方消息结果 SentTime int64 `json:"sentTime" bson:"sentTime"` // 发送时间 ExpireTime int64 `json:"expireTime,omitempty" bson:"expireTime,omitempty"` // 消息过期时间 ReadTime int64 `json:"readTime,omitempty" bson:"readTime,omitempty"` // 消息阅读时间 CreatedAt time.Time `json:"createdAt" bson:"createdAt"` // 记录创建时间 }
func NewMessageLog ¶
func NewMessageLog() *MessageLog
func (*MessageLog) Defaults ¶
func (this *MessageLog) Defaults() *MessageLog
func (*MessageLog) Load ¶
func (this *MessageLog) Load(data map[string]interface{}) *MessageLog
func (*MessageLog) Set ¶
func (this *MessageLog) Set(key string, v interface{}) *MessageLog
type MessageModel ¶
type MessageModel struct {
BaseModel
}
func MessageModelOf ¶
func MessageModelOf() *MessageModel
func (*MessageModel) CreateIndex ¶
func (this *MessageModel) CreateIndex(force ...bool)
func (*MessageModel) TableName ¶
func (this *MessageModel) TableName() string
type MessageTemplate ¶
type MessageTemplate struct { Id bson.ObjectId `json:"id" bson:"_id"` // 目标Id Type string `json:"type" bson:"type"` // 模版类型名 Title string `json:"title" bson:"title"` // 模版标题 Name string `json:"name" bson:"name"` // 模版名称 Template bson.M `json:"template" bson:"template"` // 模版信息 TemplateId string `json:"templateId,omitempty" bson:"templateId,omitempty"` // 第三方模版ID Platform string `json:"platform" bson:"platform"` // 平台 Comment string `json:"comment,omitempty" bson:"comment,omitempty"` // 备注 State int `json:"state" bson:"state"` // 状态 0:不可用,1:可用 UpdatedAt time.Time `json:"updatedAt" bson:"updatedAt"` // 更新时间 CreatedAt time.Time `json:"createdAt" bson:"createdAt"` // 创建时间 }
func NewMessageTemplate ¶
func NewMessageTemplate() *MessageTemplate
func (*MessageTemplate) Defaults ¶
func (this *MessageTemplate) Defaults() *MessageTemplate
func (*MessageTemplate) Load ¶
func (this *MessageTemplate) Load(data map[string]interface{}) *MessageTemplate
func (*MessageTemplate) Set ¶
func (this *MessageTemplate) Set(key string, v interface{}) *MessageTemplate
type MessageTemplateModel ¶
type MessageTemplateModel struct {
BaseModel
}
func MessageTemplateModelOf ¶
func MessageTemplateModelOf() *MessageTemplateModel
func (*MessageTemplateModel) Adds ¶
func (this *MessageTemplateModel) Adds(data []map[string]interface{}) error
Adds 批量添加
func (*MessageTemplateModel) CreateIndex ¶
func (this *MessageTemplateModel) CreateIndex(force ...bool)
CreateIndex 创建索引
func (*MessageTemplateModel) GetByUnique ¶
func (this *MessageTemplateModel) GetByUnique(data map[string]interface{}) *MessageTemplate
GetByUnique 通过唯一查询条件获取
func (*MessageTemplateModel) TableName ¶
func (this *MessageTemplateModel) TableName() string
type Meta ¶
type Meta struct { HasMore bool `json:"more"` P int `json:"page"` C int `json:"count"` Size int `json:"size"` Total int `json:"total"` }
func (*Meta) SetTotal ¶
func (this *Meta) SetTotal(i int) ListsParams
type Model ¶
type Model interface { Error() error Self() Model Bind(v interface{}) Model GetConn(name ...string) *mgo.Session SetProfile(key string, v interface{}) Model Db(db ...string) *mgo.Database Document() *mgo.Collection Collection(conn ...string) *mgo.Collection GetProfile(key string, defaults ...interface{}) interface{} }
type OrderByParam ¶
type Permission ¶
权限
type PopularizationChannels ¶
type PopularizationChannels struct { Id bson.ObjectId `json:"id" bson:"_id"` // 渠道ID Name string `json:"name" bson:"name"` // 渠道名 UserId string `json:"userId,omitempty" bson:"userId,omitempty"` // 用户ID Mobile string `json:"mobile,omitempty" bson:"mobile,omitempty"` // 推广用户|渠道联系号码 QrcodeUrl string `json:"qrcodeUrl" bson:"qrcodeUrl"` // 二维码链接 Email string `json:"email,omitempty" bson:"email,omitempty"` // 渠道邮箱 WeChat string `json:"wechat" bson:"wechat"` // 微信号 Awards []*AwardWay `json:"awards" bson:"awards"` // 奖励方式 InvitedRegisterNumber int64 `json:"invitedRegisterNumber" bson:"invitedRegisterNumber"` // 邀请注册人数 ValidNumber int64 `json:"validNumber" bson:"validNumber"` // 有效邀请注册人数 Channel string `json:"channel" bson:"channel"` // 6-128 渠道码 Extras beego.M `json:"extras" bson:"extras"` // 备用信息 Status int `json:"status" bson:"status"` // 状态 : 0 ,1, 2 ParentId bson.ObjectId `json:"parentId,omitempty" bson:"parentId,omitempty"` // 父级推广渠道 Permissions []*Permission `json:"permissions" bson:"permissions"` // 渠道权限 Comment string `json:"comment" bson:"comment"` // 备注 CreatedAt time.Time `json:"createdAt" bson:"createdAt"` // 创建时间 UpdatedAt time.Time `json:"updatedAt" bson:"updatedAt"` // 更新时间 // contains filtered or unexported fields }
推广渠道记录
func NewPopularizationChannel ¶
func NewPopularizationChannel() *PopularizationChannels
func (*PopularizationChannels) AddExcludeKeys ¶
func (this *PopularizationChannels) AddExcludeKeys(key ...string)
AddExcludeKeys 添加排除键
func (*PopularizationChannels) AddFilters ¶
AddFilters 添加过滤器
func (*PopularizationChannels) GetFormatterTime ¶
GetFormatterTime 时间戳格式
func (*PopularizationChannels) GetKeysFilter ¶
func (this *PopularizationChannels) GetKeysFilter(keys []string, excludes ...bool) func(data beego.M) beego.M
GetKeysFilter 字段过滤器
func (*PopularizationChannels) GetTransformFilter ¶
func (this *PopularizationChannels) GetTransformFilter(transform func(key string, v interface{}, data *beego.M)) func(data beego.M) beego.M
GetTransformFilter 字段转换器
func (*PopularizationChannels) GetTransformFilterByKey ¶
func (this *PopularizationChannels) GetTransformFilterByKey(key string, trans func(v interface{}) interface{}) func(data beego.M) beego.M
GetTransformFilterByKey 字段转换器
func (*PopularizationChannels) Incr ¶
func (this *PopularizationChannels) Incr(key string, incr ...int) bool
func (*PopularizationChannels) Init ¶
func (this *PopularizationChannels) Init()
func (*PopularizationChannels) InitDefault ¶
func (this *PopularizationChannels) InitDefault()
InitDefault 初始化默认值
func (*PopularizationChannels) IsEmpty ¶
func (this *PopularizationChannels) IsEmpty(v interface{}) bool
func (*PopularizationChannels) IsOk ¶
func (this *PopularizationChannels) IsOk() bool
func (*PopularizationChannels) Keys ¶
func (this *PopularizationChannels) Keys() []string
Keys 数据键集合
func (*PopularizationChannels) Map ¶
func (this *PopularizationChannels) Map(each func(k string, v interface{}, result interface{}) interface{}, result ...interface{}) interface{}
Map 遍历
func (*PopularizationChannels) RemoveExcludeKeys ¶
func (this *PopularizationChannels) RemoveExcludeKeys(key ...string)
RemoveExcludeKeys 移除排除键
func (*PopularizationChannels) Set ¶
func (this *PopularizationChannels) Set(key string, v interface{}) *PopularizationChannels
func (*PopularizationChannels) SetAttributes ¶
SetAttributes 设置属性值
func (*PopularizationChannels) SetBsonMapper ¶
SetBsonMapper bson Map 赋值
func (*PopularizationChannels) SetMap ¶
func (this *PopularizationChannels) SetMap(tObj *map[string]interface{}, v interface{}, force ...bool) bool
SetMap Map 赋值
func (*PopularizationChannels) SetNumIntN ¶
SetNumIntN 设置数字
func (*PopularizationChannels) SetObjectId ¶
SetObjectId 设置objectId
func (*PopularizationChannels) SetProvider ¶
func (this *PopularizationChannels) SetProvider(name string, v interface{})
SetProvider 设置服务提供函数
func (*PopularizationChannels) SetSameTypeValue ¶
func (this *PopularizationChannels) SetSameTypeValue(obj interface{}, v interface{}) bool
SetSameTypeValue 相同类型赋值
func (*PopularizationChannels) SetStringArr ¶
func (*PopularizationChannels) Values ¶
func (this *PopularizationChannels) Values() []interface{}
Values 数据值集合
func (*PopularizationChannels) Verify ¶
func (this *PopularizationChannels) Verify() error
type PopularizationChannelsModel ¶
type PopularizationChannelsModel struct {
BaseModel
}
func PopularizationChannelsModelOf ¶
func PopularizationChannelsModelOf() *PopularizationChannelsModel
func (*PopularizationChannelsModel) CreateIndex ¶
func (this *PopularizationChannelsModel) CreateIndex(force ...bool)
func (*PopularizationChannelsModel) GetByUnique ¶
func (this *PopularizationChannelsModel) GetByUnique(m beego.M) *PopularizationChannels
func (*PopularizationChannelsModel) TableName ¶
func (this *PopularizationChannelsModel) TableName() string
type PostsModel ¶
type PostsModel struct {
BaseModel
}
func PostsModelOf ¶
func PostsModelOf() *PostsModel
func (*PostsModel) CreateIndex ¶
func (this *PostsModel) CreateIndex(force ...bool)
func (*PostsModel) Incr ¶
func (this *PostsModel) Incr(id string, typ string, num ...int) error
Incr 增加
func (*PostsModel) TableName ¶
func (this *PostsModel) TableName() string
type RecommendModel ¶
type RecommendModel struct {
BaseModel
}
func RecommendModelOf ¶
func RecommendModelOf() *RecommendModel
type RequestLog ¶
type RequestLog struct { HeaderSchema Id bson.ObjectId `json:"id" bson:"_id"` // ID UserId string `json:"userId,omitempty" bson:"userId,omitempty"` // 请求用户ID Body string `json:"body" bson:"body"` // 请求体 Data beego.M `json:"data,omitempty" bson:"data,omitempty"` // 格式化转换过的数据 CreatedAt time.Time `json:"createdAt" bson:"createdAt"` // 创建时间 }
RequestLog 请求日志
func NewRequestLog ¶
func NewRequestLog() *RequestLog
func (*RequestLog) AddExcludeKeys ¶
func (this *RequestLog) AddExcludeKeys(key ...string)
AddExcludeKeys 添加排除键
func (*RequestLog) AddFilters ¶
AddFilters 添加过滤器
func (*RequestLog) GetFormatterTime ¶
GetFormatterTime 时间戳格式
func (*RequestLog) GetKeysFilter ¶
GetKeysFilter 字段过滤器
func (*RequestLog) GetTransformFilter ¶
func (this *RequestLog) GetTransformFilter(transform func(key string, v interface{}, data *beego.M)) func(data beego.M) beego.M
GetTransformFilter 字段转换器
func (*RequestLog) GetTransformFilterByKey ¶
func (this *RequestLog) GetTransformFilterByKey(key string, trans func(v interface{}) interface{}) func(data beego.M) beego.M
GetTransformFilterByKey 字段转换器
func (*RequestLog) Init ¶
func (this *RequestLog) Init()
func (*RequestLog) Map ¶
func (this *RequestLog) Map(each func(k string, v interface{}, result interface{}) interface{}, result ...interface{}) interface{}
Map 遍历
func (*RequestLog) RemoveExcludeKeys ¶
func (this *RequestLog) RemoveExcludeKeys(key ...string)
RemoveExcludeKeys 移除排除键
func (*RequestLog) Set ¶
func (this *RequestLog) Set(key string, v interface{}) *RequestLog
func (*RequestLog) SetAttributes ¶
SetAttributes 设置属性值
func (*RequestLog) SetBsonMapper ¶
SetBsonMapper bson Map 赋值
func (*RequestLog) SetNumIntN ¶
SetNumIntN 设置数字
func (*RequestLog) SetObjectId ¶
SetObjectId 设置objectId
func (*RequestLog) SetProvider ¶
func (this *RequestLog) SetProvider(name string, v interface{})
SetProvider 设置服务提供函数
func (*RequestLog) SetSameTypeValue ¶
func (this *RequestLog) SetSameTypeValue(obj interface{}, v interface{}) bool
SetSameTypeValue 相同类型赋值
func (*RequestLog) SetStringArr ¶
type RequestLogModel ¶
type RequestLogModel struct {
BaseModel
}
RequestLogModel 请求日志模型
func RequestLogModelOf ¶
func RequestLogModelOf() *RequestLogModel
func (*RequestLogModel) CreateIndex ¶
func (this *RequestLogModel) CreateIndex(force ...bool)
type SensitiveWords ¶
type SensitiveWords struct { Id bson.ObjectId `json:"id" bson:"_id"` // ID App string `json:"app" bson:"app"` // 规则名 Type string `json:"type" bson:"type"` // 分类名 Word string `json:"word" bson:"word"` // 词 Hash string `json:"hash" bson:"hash"` // 唯一 Status int `json:"status" bson:"status"` // 状态 CreatedAt time.Time `json:"createdAt" bson:"createdAt"` // 创建时间 UpdatedAt time.Time `json:"updatedAt" bson:"updatedAt"` // 更新时间 // contains filtered or unexported fields }
SensitiveWords 敏感词记录
func NewSensitiveWords ¶
func NewSensitiveWords() *SensitiveWords
func (*SensitiveWords) AddExcludeKeys ¶
func (this *SensitiveWords) AddExcludeKeys(key ...string)
AddExcludeKeys 添加排除键
func (*SensitiveWords) AddFilters ¶
AddFilters 添加过滤器
func (*SensitiveWords) GetFormatterTime ¶
GetFormatterTime 时间戳格式
func (*SensitiveWords) GetKeysFilter ¶
func (this *SensitiveWords) GetKeysFilter(keys []string, excludes ...bool) func(data beego.M) beego.M
GetKeysFilter 字段过滤器
func (*SensitiveWords) GetTransformFilter ¶
func (this *SensitiveWords) GetTransformFilter(transform func(key string, v interface{}, data *beego.M)) func(data beego.M) beego.M
GetTransformFilter 字段转换器
func (*SensitiveWords) GetTransformFilterByKey ¶
func (this *SensitiveWords) GetTransformFilterByKey(key string, trans func(v interface{}) interface{}) func(data beego.M) beego.M
GetTransformFilterByKey 字段转换器
func (*SensitiveWords) Init ¶
func (this *SensitiveWords) Init()
func (*SensitiveWords) Map ¶
func (this *SensitiveWords) Map(each func(k string, v interface{}, result interface{}) interface{}, result ...interface{}) interface{}
Map 遍历
func (*SensitiveWords) RemoveExcludeKeys ¶
func (this *SensitiveWords) RemoveExcludeKeys(key ...string)
RemoveExcludeKeys 移除排除键
func (*SensitiveWords) Set ¶
func (this *SensitiveWords) Set(key string, v interface{}) *SensitiveWords
func (*SensitiveWords) SetAttributes ¶
SetAttributes 设置属性值
func (*SensitiveWords) SetBsonMapper ¶
SetBsonMapper bson Map 赋值
func (*SensitiveWords) SetNumIntN ¶
SetNumIntN 设置数字
func (*SensitiveWords) SetObjectId ¶
SetObjectId 设置objectId
func (*SensitiveWords) SetProvider ¶
func (this *SensitiveWords) SetProvider(name string, v interface{})
SetProvider 设置服务提供函数
func (*SensitiveWords) SetSameTypeValue ¶
func (this *SensitiveWords) SetSameTypeValue(obj interface{}, v interface{}) bool
SetSameTypeValue 相同类型赋值
func (*SensitiveWords) SetStringArr ¶
type SensitiveWordsModel ¶
type SensitiveWordsModel struct {
BaseModel
}
func SensitiveWordsModelOf ¶
func SensitiveWordsModelOf() *SensitiveWordsModel
func (*SensitiveWordsModel) Adds ¶
func (this *SensitiveWordsModel) Adds(words []string, ty string, app ...string) error
Adds 批量添加
func (*SensitiveWordsModel) CreateIndex ¶
func (this *SensitiveWordsModel) CreateIndex(force ...bool)
func (*SensitiveWordsModel) Filters ¶
func (this *SensitiveWordsModel) Filters(words string) string
func (*SensitiveWordsModel) Foreach ¶
func (this *SensitiveWordsModel) Foreach(each func(it *SensitiveWords) bool, limit ...int)
func (*SensitiveWordsModel) GetByUnique ¶
func (this *SensitiveWordsModel) GetByUnique(m beego.M) *SensitiveWords
func (*SensitiveWordsModel) GetTotal ¶
func (this *SensitiveWordsModel) GetTotal() int
func (*SensitiveWordsModel) TableName ¶
func (this *SensitiveWordsModel) TableName() string
type SmsLog ¶
type SmsLog struct { Id bson.ObjectId `json:"id" bson:"id"` // 消息ID Provider string `json:"provider" bson:"provider"` // 服务商 Mobile string `json:"mobile" bson:"mobile"` // 手机号 Content string `json:"content" bson:"content"` // 消息内容 Result string `json:"result" bson:"result"` // 请求结果 State int `json:"state" bson:"state"` // 消息状态 Type string `json:"type" bson:"type"` // 消息类型 Extras string `json:"extras" bson:"extras"` // 扩展信息 Error string `json:"error,omitempty" bson:"error,omitempty"` // 异常 ExpireTimeStamp int64 `json:"expireTimeStamp" bson:"expireTimeStamp"` // 过期时间戳 CreatedAt time.Time `json:"createdAt" bson:"createdAt"` // 创建时间 }
SmsLog 短信日志记录
type SmsLogModel ¶
type SmsLogModel struct {
BaseModel
}
func SmsLogModelOf ¶
func SmsLogModelOf() *SmsLogModel
func (*SmsLogModel) CreateIndex ¶
func (this *SmsLogModel) CreateIndex(force ...bool)
func (*SmsLogModel) TableName ¶
func (this *SmsLogModel) TableName() string
type SmsTemplate ¶
type SmsTemplate struct { Content string `json:"content"` Variables []*struct { Key string `json:"key"` Value string `json:"value"` Desc string `json:"desc"` } `json:"variables"` }
SmsTemplate 短信消息模版
func NewSmsTemplate ¶
func NewSmsTemplate() *SmsTemplate
func (*SmsTemplate) Load ¶
func (this *SmsTemplate) Load(data map[string]interface{}) *SmsTemplate
func (*SmsTemplate) M ¶
func (this *SmsTemplate) M() beego.M
type StrArrayEntry ¶
func NewStrArrayEntry ¶
func NewStrArrayEntry() *StrArrayEntry
func (*StrArrayEntry) Append ¶
func (this *StrArrayEntry) Append(value string) *StrArrayEntry
func (*StrArrayEntry) Cap ¶
func (this *StrArrayEntry) Cap() int
func (*StrArrayEntry) Copy ¶
func (this *StrArrayEntry) Copy() *StrArrayEntry
func (*StrArrayEntry) Count ¶
func (this *StrArrayEntry) Count() int
func (*StrArrayEntry) Foreach ¶
func (this *StrArrayEntry) Foreach(each func(i int, value string) bool)
func (*StrArrayEntry) GetKey ¶
func (this *StrArrayEntry) GetKey() string
func (*StrArrayEntry) Init ¶
func (this *StrArrayEntry) Init()
func (*StrArrayEntry) Joins ¶
func (this *StrArrayEntry) Joins(joins ...[]string) *StrArrayEntry
func (*StrArrayEntry) Len ¶
func (this *StrArrayEntry) Len() int
func (*StrArrayEntry) Pop ¶
func (this *StrArrayEntry) Pop() string
func (*StrArrayEntry) Push ¶
func (this *StrArrayEntry) Push(i int, value string) *StrArrayEntry
func (*StrArrayEntry) SetKey ¶
func (this *StrArrayEntry) SetKey(key string) *StrArrayEntry
func (*StrArrayEntry) ToMapper ¶
func (this *StrArrayEntry) ToMapper() beego.M
func (*StrArrayEntry) Values ¶
func (this *StrArrayEntry) Values() []string
type TableNameAble ¶
type TableNameAble interface {
TableName() string
}
type Tag ¶
type Tag struct { Id bson.ObjectId `json:"id" bson:"_id"` // ID Name string `json:"name" bson:"name"` // 标签名 Alias string `json:"alias" bson:"alias"` // 别名 Group string `json:"group" bson:"group"` // 分组名 Comment string `json:"comment" bson:"comment"` // 备注 State int `json:"state" bson:"state"` // 状态 0:初始状态,1:正常,2:删除 Sort int `json:"sort" bson:"sort"` // 排序 越大越靠前 CreatedAt time.Time `json:"createdAt" bson:"createdAt"` // 创建时间 // contains filtered or unexported fields }
Tag 标签记录
func (*Tag) AddFilters ¶
AddFilters 添加过滤器
func (*Tag) GetFormatterTime ¶
GetFormatterTime 时间戳格式
func (*Tag) GetKeysFilter ¶
GetKeysFilter 字段过滤器
func (*Tag) GetTransformFilter ¶
func (this *Tag) GetTransformFilter(transform func(key string, v interface{}, data *beego.M)) func(data beego.M) beego.M
GetTransformFilter 字段转换器
func (*Tag) GetTransformFilterByKey ¶
func (this *Tag) GetTransformFilterByKey(key string, trans func(v interface{}) interface{}) func(data beego.M) beego.M
GetTransformFilterByKey 字段转换器
func (*Tag) Map ¶
func (this *Tag) Map(each func(k string, v interface{}, result interface{}) interface{}, result ...interface{}) interface{}
Map 遍历
func (*Tag) RemoveExcludeKeys ¶
func (this *Tag) RemoveExcludeKeys(key ...string)
RemoveExcludeKeys 移除排除键
func (*Tag) SetAttributes ¶
SetAttributes 设置属性值
func (*Tag) SetBsonMapper ¶
SetBsonMapper bson Map 赋值
func (*Tag) SetNumIntN ¶
SetNumIntN 设置数字
func (*Tag) SetObjectId ¶
SetObjectId 设置objectId
func (*Tag) SetProvider ¶
func (this *Tag) SetProvider(name string, v interface{})
SetProvider 设置服务提供函数
func (*Tag) SetSameTypeValue ¶
func (this *Tag) SetSameTypeValue(obj interface{}, v interface{}) bool
SetSameTypeValue 相同类型赋值
func (*Tag) SetStringArr ¶
type TagModel ¶
type TagModel struct {
BaseModel
}
func TagsModelOf ¶
func TagsModelOf() *TagModel
func (*TagModel) CreateIndex ¶
func (*TagModel) GetByUnique ¶
GetByUnique 通过唯一索引查询
func (*TagModel) GetTagsByGroup ¶
type ThumbsUp ¶
type ThumbsUp struct { Id bson.ObjectId `json:"id" bson:"_id"` Status int `json:"status" bson:"status"` Type string `json:"type" bson:"type"` // 类型 UserId string `json:"userId" bson:"userId"` TypeId string `json:"typeId" bson:"typeId"` Count int `json:"count" bson:"count"` CreatedAt time.Time `json:"createdAt" bson:"createdAt"` UpdatedAt time.Time `json:"updatedAt" bson:"updatedAt"` }
ThumbsUp 点赞数据
type ThumbsUpModel ¶
type ThumbsUpModel struct {
BaseModel
}
func ThumbsUpModelOf ¶
func ThumbsUpModelOf() *ThumbsUpModel
func (*ThumbsUpModel) CreateIndex ¶
func (this *ThumbsUpModel) CreateIndex(force ...bool)
func (*ThumbsUpModel) TableName ¶
func (this *ThumbsUpModel) TableName() string
type TravelNotes ¶
type TravelNotes struct { Id bson.ObjectId `json:"id" bson:"_id"` Title string `json:"title" bson:"title"` // 标题 Content string `json:"content" bson:"content"` // 内容 Type int `json:"type" bson:"type"` // 类型 Images []string `json:"images,omitempty" bson:"images,omitempty"` // 图片ID UserId string `json:"userId" bson:"userId"` // 用户ID Videos []string `json:"videos,omitempty" bson:"videos,omitempty"` // 视频ID Group string `json:"group" bson:"group"` // 分组类型名 Tags []string `json:"tags" bson:"tags"` // 标签ID Status int `json:"status" bson:"status"` // 审核状态 Address string `json:"address" bson:"address"` // 地址 LinkUrl string `json:"link_url" bson:"link_url"` // 外链 Privacy int `json:"privacy" bson:"privacy"` // 是否公开 ThumbsUpNum int64 `json:"thumbsUpNum" bson:"thumbsUpNum"` // 点赞数 CommentNum int64 `json:"commentNum" bson:"commentNum"` // 评论数 Score int64 `json:"score" bson:"score"` // 作品评分 UpdatedAt time.Time `json:"updatedAt" bson:"updatedAt"` // 更新时间 CreatedAt time.Time `json:"createdAt" bson:"createdAt"` // 创建时间 DeletedAt int64 `json:"deletedAt" bson:"deletedAt"` // 删除时间 }
TravelNotes 游记|攻略
func NewTravelNotes ¶
func NewTravelNotes() *TravelNotes
func (*TravelNotes) CanHasVideo ¶
func (this *TravelNotes) CanHasVideo() bool
func (*TravelNotes) Defaults ¶
func (this *TravelNotes) Defaults() *TravelNotes
func (*TravelNotes) GetImages ¶
func (this *TravelNotes) GetImages() []*Image
func (*TravelNotes) GetPrivacy ¶
func (this *TravelNotes) GetPrivacy() string
func (*TravelNotes) GetState ¶
func (this *TravelNotes) GetState() string
func (*TravelNotes) GetTagsText ¶
func (this *TravelNotes) GetTagsText() []string
GetTagsText 获取标签描述
func (*TravelNotes) GetType ¶
func (this *TravelNotes) GetType() string
func (*TravelNotes) GetTypeCode ¶
func (this *TravelNotes) GetTypeCode() string
func (*TravelNotes) GetVideos ¶
func (this *TravelNotes) GetVideos() []*Video
func (*TravelNotes) IsAutoAuditType ¶
func (this *TravelNotes) IsAutoAuditType() bool
func (*TravelNotes) IsEmpty ¶
func (this *TravelNotes) IsEmpty() bool
func (*TravelNotes) Load ¶
func (this *TravelNotes) Load(data bson.M) *TravelNotes
func (*TravelNotes) Save ¶
func (this *TravelNotes) Save() error
func (*TravelNotes) Set ¶
func (this *TravelNotes) Set(key string, v interface{}) *TravelNotes
type TxnContext ¶
type TxnContext struct { TxnOps []txn.Op TxnRunner *txn.Runner TxnId bson.ObjectId TxnResult interface{} }
TxnContext 事务上下文
type UrlAccessService ¶
type UrlAccessService interface {
GetTicketUrlByAttach(*Attachment) string
}
type User ¶
type User struct { Id bson.ObjectId `json:"id" bson:"_id"` // 唯一ID UserNumId int64 `json:"userNumId" bson:"userNumId"` // 用户注册序号 Role int `json:"role" bson:"role"` // 用户类型 UserName string `json:"username" bson:"username"` // 用户名唯一 Intro string `json:"intro" bson:"intro"` // 个人简介 BackgroundCoverId string `json:"backgroundCoverId" bson:"backgroundCoverId"` // 个人也背景 AvatarId string `json:"avatarId,omitempty" bson:"avatarId,omitempty"` // 头像ID NickName string `json:"nickname,omitempty" bson:"nickname,omitempty"` // 昵称 PasswordHash string `json:"passwordHash" bson:"passwordHash"` // 密码密码 Mobile string `json:"mobile,omitempty" bson:"mobile,omitempty"` // 手机号 Email string `json:"email,omitempty" bson:"email,omitempty"` // 邮箱 ResetPasswordTimes int `json:"resetPasswordTimes" bson:"resetPasswordTimes"` // 重置密码次数 RegisterWay string `json:"registerWay" bson:"registerWay"` // 注册方式 AccessTokens []string `json:"accessTokens" bson:"accessTokens"` // 授权临牌集合 LastLoginAt int64 `json:"lastLoginAt" bson:"lastLoginAt"` // 最近一次登陆时间 LastLoginLocation string `json:"lastLoginLocation" bson:"lastLoginLocation"` // 最近一次登陆定位 Status int `json:"status" bson:"status"` // 用户状态 -1:拉黑,1:正常,2:禁用 Gender int `json:"gender" bson:"gender"` // 用户性别 0:保密 1:男 2:女 3:😯 Birthday int64 `json:"birthday,omitempty" bson:"birthday,omitempty"` // 用户生日 Address string `json:"address" bson:"address"` // 用户地址 ThumbsUpTotal int64 `json:"thumbsUpNum" bson:"thumbsUpNum"` // 点赞总数 InviteCode string `json:"inviteCode" bson:"inviteCode"` // 邀请码 6-64 CreatedAt time.Time `json:"createdAt" bson:"createdAt"` // 创建时间 注册时间 UpdatedAt time.Time `json:"updatedAt" bson:"updatedAt"` // 更新时间 DeletedAt int64 `json:"deletedAt" bson:"deletedAt"` // 删除时间戳 // contains filtered or unexported fields }
func (*User) AddFilters ¶
AddFilters 添加过滤器
func (*User) GetAddress ¶
func (*User) GetFormatterTime ¶
GetFormatterTime 时间戳格式
func (*User) GetInviteCode ¶
func (*User) GetKeysFilter ¶
GetKeysFilter 字段过滤器
func (*User) GetNickName ¶
func (*User) GetPasswordHash ¶
func (*User) GetTransformFilter ¶
func (this *User) GetTransformFilter(transform func(key string, v interface{}, data *beego.M)) func(data beego.M) beego.M
GetTransformFilter 字段转换器
func (*User) GetTransformFilterByKey ¶
func (this *User) GetTransformFilterByKey(key string, trans func(v interface{}) interface{}) func(data beego.M) beego.M
GetTransformFilterByKey 字段转换器
func (*User) GetUserNumId ¶
func (*User) IsBlackList ¶
func (*User) IsRootRole ¶
func (*User) Map ¶
func (this *User) Map(each func(k string, v interface{}, result interface{}) interface{}, result ...interface{}) interface{}
Map 遍历
func (*User) RemoveExcludeKeys ¶
func (this *User) RemoveExcludeKeys(key ...string)
RemoveExcludeKeys 移除排除键
func (*User) SetAttributes ¶
SetAttributes 设置属性值
func (*User) SetBsonMapper ¶
SetBsonMapper bson Map 赋值
func (*User) SetNumIntN ¶
SetNumIntN 设置数字
func (*User) SetObjectId ¶
SetObjectId 设置objectId
func (*User) SetProvider ¶
func (this *User) SetProvider(name string, v interface{})
SetProvider 设置服务提供函数
func (*User) SetSameTypeValue ¶
func (this *User) SetSameTypeValue(obj interface{}, v interface{}) bool
SetSameTypeValue 相同类型赋值
func (*User) SetStringArr ¶
type UserAddress ¶
type UserAddress struct { Id bson.ObjectId `json:"id" bson:"_id"` // id UserId bson.ObjectId `json:"userId" bson:"userId"` // 地址所属用户 Type int `json:"type" bson:"type"` // 地址类型 1: 注册地址 Version int `json:"version" json:"version"` // 地址更新处理 Hash string `json:"hash" bson:"hash"` // 用户地址唯一值 Sort int `json:"sort" json:"sort"` // 排序 Text string `json:"text,omitempty" json:"text,omitempty"` // 字符串文本地址 State int `json:"state" bson:"state"` // 状态 -1:已过期,0:不可用, 1: 可用|正常 Country string `json:"country,omitempty" bson:"country,omitempty"` // 国家 CountryId int `json:"countryId" bson:"countryId"` // 国家编码 City string `json:"city,omitempty" bson:"city,omitempty"` // 城市 CityId string `json:"cityId,omitempty" bson:"cityId,omitempty"` // 城市编码 Province string `json:"province,omitempty" bson:"province,omitempty"` // 省份 ProvinceId string `json:"provinceId,omitempty" bson:"provinceId,omitempty"` // 省份编码 District string `json:"district,omitempty" bson:"district,omitempty"` // 行政区 DistrictId string `json:"districtId,omitempty" json:"districtId,omitempty"` // 行政区编码 Street string `json:"street,omitempty" json:"street,omitempty"` // 街区 StreetId string `json:"streetId,omitempty" json:"streetId,omitempty"` // 街区编码 Floor string `json:"floor,omitempty" bson:"floor,omitempty"` // 楼层 eg : 天辉大厦18楼 Doorplate string `json:"doorplate,omitempty" bson:"doorplate,omitempty"` // 门牌号 Longitude float64 `json:"longitude,omitempty" bson:"longitude,omitempty"` // 经度 [东-西] Latitude float64 `json:"latitude,omitempty" bson:"latitude,omitempty"` // 纬度 [南-北] CreateTime int64 `json:"createTime" bson:"createTime"` // 创建日期 // contains filtered or unexported fields }
地址模型
func NewUserAddress ¶
func NewUserAddress() *UserAddress
func (*UserAddress) AddExcludeKeys ¶
func (this *UserAddress) AddExcludeKeys(key ...string)
AddExcludeKeys 添加排除键
func (*UserAddress) AddFilters ¶
AddFilters 添加过滤器
func (*UserAddress) GetFormatterTime ¶
GetFormatterTime 时间戳格式
func (*UserAddress) GetKeysFilter ¶
GetKeysFilter 字段过滤器
func (*UserAddress) GetTransformFilter ¶
func (this *UserAddress) GetTransformFilter(transform func(key string, v interface{}, data *beego.M)) func(data beego.M) beego.M
GetTransformFilter 字段转换器
func (*UserAddress) GetTransformFilterByKey ¶
func (this *UserAddress) GetTransformFilterByKey(key string, trans func(v interface{}) interface{}) func(data beego.M) beego.M
GetTransformFilterByKey 字段转换器
func (*UserAddress) Init ¶
func (this *UserAddress) Init()
func (*UserAddress) Load ¶
func (this *UserAddress) Load(data map[string]interface{}) *UserAddress
Load 数据加载
func (*UserAddress) Location ¶
func (this *UserAddress) Location() *Location
func (*UserAddress) Map ¶
func (this *UserAddress) Map(each func(k string, v interface{}, result interface{}) interface{}, result ...interface{}) interface{}
Map 遍历
func (*UserAddress) Parse ¶
func (this *UserAddress) Parse(v interface{}) bool
func (*UserAddress) RemoveExcludeKeys ¶
func (this *UserAddress) RemoveExcludeKeys(key ...string)
RemoveExcludeKeys 移除排除键
func (*UserAddress) Set ¶
func (this *UserAddress) Set(key string, v interface{}) *UserAddress
Set 设置器
func (*UserAddress) SetAttributes ¶
SetAttributes 设置属性值
func (*UserAddress) SetBsonMapper ¶
SetBsonMapper bson Map 赋值
func (*UserAddress) SetNumIntN ¶
SetNumIntN 设置数字
func (*UserAddress) SetObjectId ¶
SetObjectId 设置objectId
func (*UserAddress) SetProvider ¶
func (this *UserAddress) SetProvider(name string, v interface{})
SetProvider 设置服务提供函数
func (*UserAddress) SetSameTypeValue ¶
func (this *UserAddress) SetSameTypeValue(obj interface{}, v interface{}) bool
SetSameTypeValue 相同类型赋值
func (*UserAddress) SetStringArr ¶
func (*UserAddress) String ¶
func (this *UserAddress) String() string
type UserAddressModel ¶
type UserAddressModel struct {
BaseModel
}
func UserAddressModelOf ¶
func UserAddressModelOf() *UserAddressModel
func (*UserAddressModel) CreateIndex ¶
func (this *UserAddressModel) CreateIndex(force ...bool)
func (*UserAddressModel) GetAddressByUserId ¶
func (this *UserAddressModel) GetAddressByUserId(userId bson.ObjectId, typ ...int) *UserAddress
func (*UserAddressModel) GetUserAddress ¶
func (this *UserAddressModel) GetUserAddress(userId bson.ObjectId, typ int) string
func (*UserAddressModel) GetUserAddressList ¶
func (this *UserAddressModel) GetUserAddressList(userId bson.ObjectId, typ int) []string
func (*UserAddressModel) TableName ¶
func (this *UserAddressModel) TableName() string
type UserFocusModel ¶
type UserFocusModel struct {
BaseModel
}
用户关注数据模型
func UserFocusModelOf ¶
func UserFocusModelOf() *UserFocusModel
func (*UserFocusModel) GetByUnique ¶
func (this *UserFocusModel) GetByUnique(m beego.M) *UserFollow
func (*UserFocusModel) GetFocusCount ¶
func (this *UserFocusModel) GetFocusCount(userId string) int
获取用户被关注数
func (*UserFocusModel) GetFocusTwo ¶
func (this *UserFocusModel) GetFocusTwo(userId, userId2 string) bool
是否用户互关注
func (*UserFocusModel) GetUserFocusCount ¶
func (this *UserFocusModel) GetUserFocusCount(userId string) int
获取用户关注数
func (*UserFocusModel) GetUserFocusLists ¶
func (this *UserFocusModel) GetUserFocusLists(userId string, params ...ListsParams) ([]*UserFollow, ListsParams)
获取 用户关注列表
type UserFollow ¶
type UserFollow struct { Id bson.ObjectId `json:"id" bson:"_id"` // ID Status int `json:"status" bson:"status"` // 状态 UserId bson.ObjectId `json:"userId" bson:"userId"` // 用户ID TargetId bson.ObjectId `json:"targetId,omitempty" bson:"targetId,omitempty"` // 引发关注的作品ID FocusUserId bson.ObjectId `json:"focusUserId" bson:"focusUserId"` // 被关注的用户ID Extras beego.M `json:"extras" bson:"extras"` // 扩展数据 CreatedAt time.Time `json:"createdAt" bson:"createdAt"` // 创建时间 UpdatedAt time.Time `json:"updatedAt" bson:"updatedAt"` // 更新时间 // contains filtered or unexported fields }
用户关注
func NewUserFocus ¶
func NewUserFocus() *UserFollow
func (*UserFollow) AddExcludeKeys ¶
func (this *UserFollow) AddExcludeKeys(key ...string)
AddExcludeKeys 添加排除键
func (*UserFollow) AddFilters ¶
AddFilters 添加过滤器
func (*UserFollow) GetFormatterTime ¶
GetFormatterTime 时间戳格式
func (*UserFollow) GetKeysFilter ¶
GetKeysFilter 字段过滤器
func (*UserFollow) GetTransformFilter ¶
func (this *UserFollow) GetTransformFilter(transform func(key string, v interface{}, data *beego.M)) func(data beego.M) beego.M
GetTransformFilter 字段转换器
func (*UserFollow) GetTransformFilterByKey ¶
func (this *UserFollow) GetTransformFilterByKey(key string, trans func(v interface{}) interface{}) func(data beego.M) beego.M
GetTransformFilterByKey 字段转换器
func (*UserFollow) Init ¶
func (this *UserFollow) Init()
func (*UserFollow) Map ¶
func (this *UserFollow) Map(each func(k string, v interface{}, result interface{}) interface{}, result ...interface{}) interface{}
Map 遍历
func (*UserFollow) RemoveExcludeKeys ¶
func (this *UserFollow) RemoveExcludeKeys(key ...string)
RemoveExcludeKeys 移除排除键
func (*UserFollow) Set ¶
func (this *UserFollow) Set(key string, v interface{}) *UserFollow
func (*UserFollow) SetAttributes ¶
SetAttributes 设置属性值
func (*UserFollow) SetBsonMapper ¶
SetBsonMapper bson Map 赋值
func (*UserFollow) SetNumIntN ¶
SetNumIntN 设置数字
func (*UserFollow) SetObjectId ¶
SetObjectId 设置objectId
func (*UserFollow) SetProvider ¶
func (this *UserFollow) SetProvider(name string, v interface{})
SetProvider 设置服务提供函数
func (*UserFollow) SetSameTypeValue ¶
func (this *UserFollow) SetSameTypeValue(obj interface{}, v interface{}) bool
SetSameTypeValue 相同类型赋值
func (*UserFollow) SetStringArr ¶
type UserLoginLog ¶
type UserLoginLog struct { Id bson.ObjectId `json:"id" bson:"_id"` Uid string `json:"userId" bson:"userId"` LoginTime time.Time `json:"loginTime" bson:"loginTime"` Device string `json:"device" bson:"device"` Client string `json:"client" bson:"client"` LoginLocation string `json:"loginLocation" bson:"loginLocation"` CreatedAt time.Time `json:"createdAt" bson:"createdAt"` }
type UserLoginLogModel ¶
type UserLoginLogModel struct {
BaseModel
}
func UserLoginLogModelOf ¶
func UserLoginLogModelOf() *UserLoginLogModel
func (*UserLoginLogModel) TableName ¶
func (this *UserLoginLogModel) TableName() string
type UserModel ¶
type UserModel struct {
BaseModel
}
func UserModelOf ¶
func UserModelOf() *UserModel
func (*UserModel) CreateIndex ¶
type UserProfile ¶
type UserProfile struct { Gender int `json:"gender"` // 性别类型ID UserNumber int64 `json:"userNumId"` // 用户数字ID Intro string `json:"intro"` // 简介 BackgroundCoverUrl string `json:"backgroundCoverUrl"` // 背景图片URL Avatar *AvatarInfo `json:"avatar"` // 用户头像 UserId string `json:"userId"` // 用户唯一ID Address *AddressInfo `json:"address"` // 地址 NickName string `json:"nickname"` // 用户昵称 GenderDesc string `json:"genderDesc"` // 性别描述 PostNumber int64 `json:"postNum"` // 用户作品数 ThumbsUpNum int64 `json:"thumbsUpNum"` // 点赞数 ThumbsUpNumTxt string `json:"thumbsUpNumTxt"` // 点赞数字符串 CommentNum int64 `json:"commentNum"` // 评论数 CommentNumTxt string `json:"commentNumTxt"` // 评论数字符串 LikesNum int64 `json:"likesNum"` // 用户喜欢作品数量 FollowNum int64 `json:"followNum"` // 用户关注数 FansNum int64 `json:"fansNum"` // 用户粉丝数 }
公共用户相关信息
type UserRelation ¶
type UserRelation struct { Id bson.ObjectId `json:"id" bson:"_id"` // ID UserId string `json:"userId" bson:"userId"` // 用户ID TargetUserId string `json:"targetUserId" bson:"targetUserId"` // 关系目标用户ID TargetType string `json:"targetType" bson:"targetType"` // 关系类型 Status int `json:"status" bson:"status"` // 状态 Extras beego.M `json:"extras" bson:"extras"` // 扩展信息 Tags []string `json:"tags" bson:"tags"` // 分类tags Versions []string `json:"versions" bson:"versions"` // 状态版本变化历史 ["1-2020-08-01","2-2020-10-01"] CreatedAt time.Time `json:"createdAt" bson:"createdAt"` // 创建时间 UpdatedAt time.Time `json:"updatedAt" bson:"updatedAt"` // 更新时间 DeletedAt int64 `json:"deletedAt" bson:"deletedAt"` // 删除时间 // contains filtered or unexported fields }
用户关系记录
func NewUserRelation ¶
func NewUserRelation() *UserRelation
func (*UserRelation) AddExcludeKeys ¶
func (this *UserRelation) AddExcludeKeys(key ...string)
AddExcludeKeys 添加排除键
func (*UserRelation) AddFilters ¶
AddFilters 添加过滤器
func (*UserRelation) GetFormatterTime ¶
GetFormatterTime 时间戳格式
func (*UserRelation) GetKeysFilter ¶
GetKeysFilter 字段过滤器
func (*UserRelation) GetTransformFilter ¶
func (this *UserRelation) GetTransformFilter(transform func(key string, v interface{}, data *beego.M)) func(data beego.M) beego.M
GetTransformFilter 字段转换器
func (*UserRelation) GetTransformFilterByKey ¶
func (this *UserRelation) GetTransformFilterByKey(key string, trans func(v interface{}) interface{}) func(data beego.M) beego.M
GetTransformFilterByKey 字段转换器
func (*UserRelation) Init ¶
func (this *UserRelation) Init()
func (*UserRelation) Map ¶
func (this *UserRelation) Map(each func(k string, v interface{}, result interface{}) interface{}, result ...interface{}) interface{}
Map 遍历
func (*UserRelation) RemoveExcludeKeys ¶
func (this *UserRelation) RemoveExcludeKeys(key ...string)
RemoveExcludeKeys 移除排除键
func (*UserRelation) Set ¶
func (this *UserRelation) Set(key string, v interface{}) *UserRelation
func (*UserRelation) SetAttributes ¶
SetAttributes 设置属性值
func (*UserRelation) SetBsonMapper ¶
SetBsonMapper bson Map 赋值
func (*UserRelation) SetNumIntN ¶
SetNumIntN 设置数字
func (*UserRelation) SetObjectId ¶
SetObjectId 设置objectId
func (*UserRelation) SetProvider ¶
func (this *UserRelation) SetProvider(name string, v interface{})
SetProvider 设置服务提供函数
func (*UserRelation) SetSameTypeValue ¶
func (this *UserRelation) SetSameTypeValue(obj interface{}, v interface{}) bool
SetSameTypeValue 相同类型赋值
func (*UserRelation) SetStringArr ¶
type UserRelationModel ¶
type UserRelationModel struct {
BaseModel
}
func UserRelationModelOf ¶
func UserRelationModelOf() *UserRelationModel
func (*UserRelationModel) CreateIndex ¶
func (this *UserRelationModel) CreateIndex(force ...bool)
func (*UserRelationModel) GetByUnique ¶
func (this *UserRelationModel) GetByUnique(m beego.M) *UserRelation
唯一
func (*UserRelationModel) SaveInfo ¶
func (this *UserRelationModel) SaveInfo(userId string, targetUserId string, extras ...beego.M) error
保存关系记录
func (*UserRelationModel) TableName ¶
func (this *UserRelationModel) TableName() string
type UserRoleType ¶
type UserRoleType struct { Id bson.ObjectId `json:"id" bson:"_id"` // ID Name string `json:"name" bson:"name"` // 身份名 Role int `json:"role" json:"role"` // 身份ID State int `json:"state" json:"state"` // 状态 Level int `json:"level" json:"level"` // 身份等级 最高 99999,(1~99999) Extras bson.M `json:"extras,omitempty" json:"extras,omitempty"` // 扩展信息 Comment string `json:"comment,omitempty" json:"comment,omitempty"` // 备注 CreatedAt time.Time `json:"createdAt" bson:"createdAt"` // 创建时间 // contains filtered or unexported fields }
用户身份类型
func NewUserRole ¶
func NewUserRole() *UserRoleType
func (*UserRoleType) AddExcludeKeys ¶
func (this *UserRoleType) AddExcludeKeys(key ...string)
AddExcludeKeys 添加排除键
func (*UserRoleType) AddFilters ¶
AddFilters 添加过滤器
func (*UserRoleType) GetFormatterTime ¶
GetFormatterTime 时间戳格式
func (*UserRoleType) GetKeysFilter ¶
GetKeysFilter 字段过滤器
func (*UserRoleType) GetTransformFilter ¶
func (this *UserRoleType) GetTransformFilter(transform func(key string, v interface{}, data *beego.M)) func(data beego.M) beego.M
GetTransformFilter 字段转换器
func (*UserRoleType) GetTransformFilterByKey ¶
func (this *UserRoleType) GetTransformFilterByKey(key string, trans func(v interface{}) interface{}) func(data beego.M) beego.M
GetTransformFilterByKey 字段转换器
func (*UserRoleType) Init ¶
func (this *UserRoleType) Init()
func (*UserRoleType) Map ¶
func (this *UserRoleType) Map(each func(k string, v interface{}, result interface{}) interface{}, result ...interface{}) interface{}
Map 遍历
func (*UserRoleType) RemoveExcludeKeys ¶
func (this *UserRoleType) RemoveExcludeKeys(key ...string)
RemoveExcludeKeys 移除排除键
func (*UserRoleType) Set ¶
func (this *UserRoleType) Set(key string, v interface{}) *UserRoleType
setter
func (*UserRoleType) SetAttributes ¶
SetAttributes 设置属性值
func (*UserRoleType) SetBsonMapper ¶
SetBsonMapper bson Map 赋值
func (*UserRoleType) SetNumIntN ¶
SetNumIntN 设置数字
func (*UserRoleType) SetObjectId ¶
SetObjectId 设置objectId
func (*UserRoleType) SetProvider ¶
func (this *UserRoleType) SetProvider(name string, v interface{})
SetProvider 设置服务提供函数
func (*UserRoleType) SetSameTypeValue ¶
func (this *UserRoleType) SetSameTypeValue(obj interface{}, v interface{}) bool
SetSameTypeValue 相同类型赋值
func (*UserRoleType) SetStringArr ¶
type UserRolesConfigModel ¶
type UserRolesConfigModel struct {
BaseModel
}
func UserRolesConfigModelOf ¶
func UserRolesConfigModelOf() *UserRolesConfigModel
func (*UserRolesConfigModel) Adds ¶
func (this *UserRolesConfigModel) Adds(items []map[string]interface{}) error
批量导入
func (*UserRolesConfigModel) CreateIndex ¶
func (this *UserRolesConfigModel) CreateIndex(force ...bool)
func (*UserRolesConfigModel) GetByUnique ¶
func (this *UserRolesConfigModel) GetByUnique(data map[string]interface{}) *UserRoleType
func (*UserRolesConfigModel) GetRoleName ¶
func (this *UserRolesConfigModel) GetRoleName(role int) string
func (*UserRolesConfigModel) TableName ¶
func (this *UserRolesConfigModel) TableName() string
type Video ¶
type Video struct { MediaId string `json:"mediaId" bson:"mediaId"` // ID Url string `json:"url" bson:"url"` // url Size int `json:"size" bson:"size"` // 大小 CoverUrl string `json:"coverUrl" bson:"coverUrl"` // 视频封面 SizeText string `json:"sizeText" bson:"sizeText"` // 大小 Duration time.Duration `json:"duration" bson:"duration"` // 时长 DurationText string `json:"durationText" bson:"durationText"` // 时长描述 CoverId string `json:"coverId" bson:"coverId"` // 封面ID }
Video 视频
Source Files ¶
- address_model.go
- app_base_config.go
- app_model.go
- apply_model.go
- attachment_model.go
- audit_log_model.go
- auth_model.go
- base_data.go
- base_model.go
- captcha_model.go
- classify_model.go
- collect_model.go
- comment_model.go
- common_model.go
- config_model.go
- discover_model.go
- doc.go
- message_model.go
- message_template_model.go
- meta_model.go
- popularization_channels_model.go
- posts_model.go
- recommend_model.go
- schema_model.go
- sensitive_words_model.go
- sms_log_model.go
- tag_model.go
- thumbs_up_model.go
- user_address_model.go
- user_follow_model.go
- user_login_log_model.go
- user_model.go
- user_relation_model.go
- user_role_type_model.go