广告平台(站长使用)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

enum_admin.go 579 B

4 months ago
12345678910111213141516171819202122232425262728293031323334353637
  1. package enum
  2. type AdminState int32
  3. const (
  4. AdminStateForNormal = 1
  5. AdminStateForFreeze = 2
  6. )
  7. func (gt AdminState) String() string {
  8. switch gt {
  9. case AdminStateForNormal:
  10. return "正常"
  11. case AdminStateForFreeze:
  12. return "冻结"
  13. default:
  14. return "未知"
  15. }
  16. }
  17. type IsSuperAdministrator int32
  18. const (
  19. IsSuperAdministratorTure = 1
  20. IsSuperAdministratorFalse = 2
  21. )
  22. func (gt IsSuperAdministrator) String() string {
  23. switch gt {
  24. case IsSuperAdministratorTure:
  25. return "超管"
  26. case IsSuperAdministratorFalse:
  27. return "非超管"
  28. default:
  29. return "未知"
  30. }
  31. }