package dbstruct type SingleDistributeLock struct { Id int64 `json:"id" bson:"_id"` //id,主播的mid Lock int64 `json:"lock" bson:"lock"` //发帖次数 } func (p *SingleDistributeLock) IsLocked() bool { if p == nil { return false } return p.Lock > 0 }