智慧食堂
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

68 linhas
1.4 KiB

  1. package enum
  2. type UserIdentity int32
  3. const (
  4. UserIdentityForCentralKitchenForStudent = 1
  5. UserIdentityForCentralKitchenForTeacher = 2
  6. UserIdentityForCentralKitchenForWorker = 3
  7. UserIdentityForSelfSupportForStudent = 4
  8. UserIdentityForSelfSupportForTeacher = 5
  9. UserIdentityForSelfSupportForWorker = 6
  10. )
  11. func (gt UserIdentity) String() string {
  12. switch gt {
  13. case UserIdentityForCentralKitchenForStudent:
  14. return "央厨-学生"
  15. case UserIdentityForCentralKitchenForTeacher:
  16. return "央厨-教职员工"
  17. case UserIdentityForCentralKitchenForWorker:
  18. return "央厨-工作人员"
  19. case UserIdentityForSelfSupportForStudent:
  20. return "自营-学生"
  21. case UserIdentityForSelfSupportForTeacher:
  22. return "自营-教职员工"
  23. case UserIdentityForSelfSupportForWorker:
  24. return "自营-工作人员"
  25. default:
  26. return "未知"
  27. }
  28. }
  29. type UserIdentityKind int32
  30. const (
  31. UserIdentityKindForCommon = 1
  32. UserIdentityKindForWorker = 2
  33. )
  34. func (gt UserIdentityKind) String() string {
  35. switch gt {
  36. case UserIdentityKindForCommon:
  37. return "普通用户"
  38. case UserIdentityKindForWorker:
  39. return "工作人员"
  40. default:
  41. return "未知"
  42. }
  43. }
  44. type UserIdentityState int32
  45. const (
  46. UserIdentityStateForNormal = 1
  47. UserIdentityStateForFreeze = 2
  48. )
  49. func (gt UserIdentityState) String() string {
  50. switch gt {
  51. case UserIdentityStateForNormal:
  52. return "正常"
  53. case UserIdentityStateForFreeze:
  54. return "冻结"
  55. default:
  56. return "未知"
  57. }
  58. }