智慧食堂
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_user_identity.go 2.0 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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. }
  62. type UserIdentityCertType int32
  63. const (
  64. UserIdentityCertTypeForIdCard = 1
  65. UserIdentityCertTypeForStudentId = 2
  66. UserIdentityCertTypeForPassport = 3
  67. )
  68. func (gt UserIdentityCertType) String() string {
  69. switch gt {
  70. case UserIdentityCertTypeForIdCard:
  71. return "身份证"
  72. case UserIdentityCertTypeForStudentId:
  73. return "学工号"
  74. case UserIdentityCertTypeForPassport:
  75. return "护照"
  76. default:
  77. return "未知"
  78. }
  79. }