MCPcopy Create free account
hub / github.com/TruthHun/BookStack / Relation

Method Relation

models/fans.go:50–54  ·  view source on GitHub ↗

查询是否已经关注了用户

(uid, fansId interface{})

Source from the content-addressed store, hash-verified

48
49//查询是否已经关注了用户
50func (this *Fans) Relation(uid, fansId interface{}) (ok bool) {
51 var fans Fans
52 orm.NewOrm().QueryTable(tableFans).Filter("uid", uid).Filter("fans_id", fansId).One(&fans)
53 return fans.Id != 0
54}
55
56//查询用户的粉丝(用户id作为被关注对象)
57func (this *Fans) GetFansList(uid, page, pageSize int) (fans []FansResult, total int64, err error) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected