user_flag.go 253 B

12345678910111213141516
  1. package model
  2. const (
  3. // NickUpdated 首次改昵称
  4. NickUpdated = uint(1)
  5. )
  6. // HasAttr get attr.
  7. func HasAttr(flag uint, bit uint) bool {
  8. return flag&bit == bit
  9. }
  10. // SetAttr set attr.
  11. func SetAttr(flag uint, bit uint) uint {
  12. return flag | bit
  13. }