智慧食堂
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

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