智慧食堂
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

enum_user_identity.go 1.5 KiB

il y a 1 an
il y a 1 an
il y a 1 an
il y a 1 an
il y a 1 an
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. }