service/dbstruct/accountrelation.go

20 lines
731 B
Go

package dbstruct
type AccountRelation struct {
Id *int64 `json:"id" bson:"_id"` // 用户关系表id
SubMid *int64 `json:"sub_mid" bson:"sub_mid"` // 主语用户mid
ObjMid *int64 `json:"obj_mid" bson:"obj_mid"` // 宾语用户mid
Predicate *int64 `json:"predicate" bson:"predicate"` // 谓词
Ct *int64 `json:"ct" bson:"ct"` // 创建时间
Ut *int64 `json:"ut" bson:"ut"` // 更新时间
DelFlag *int64 `json:"del_flag" bson:"del_flag"` // 删除标记
}
// 主语、宾语、谓词均不能为空
func (p *AccountRelation) IsEmpty() bool {
if p == nil {
return true
}
return p.SubMid == nil || p.ObjMid == nil || p.Predicate == nil
}