- package enum
-
- type UserIdentity int32
-
- const (
- UserIdentityForCentralKitchenForStudent = 1
- UserIdentityForCentralKitchenForTeacher = 2
- UserIdentityForCentralKitchenForWorker = 3
- UserIdentityForSelfSupportForStudent = 4
- UserIdentityForSelfSupportForTeacher = 5
- UserIdentityForSelfSupportForWorker = 6
- UserIdentityForNursingHome = 7
- UserIdentityForFactory = 8
- )
-
- func (gt UserIdentity) String() string {
- switch gt {
- case UserIdentityForCentralKitchenForStudent:
- return "央厨-学生"
- case UserIdentityForCentralKitchenForTeacher:
- return "央厨-教职员工"
- case UserIdentityForCentralKitchenForWorker:
- return "央厨-工作人员"
- case UserIdentityForSelfSupportForStudent:
- return "自营-学生"
- case UserIdentityForSelfSupportForTeacher:
- return "自营-教职员工"
- case UserIdentityForSelfSupportForWorker:
- return "自营-工作人员"
- case UserIdentityForNursingHome:
- return "养老院-普通用户"
- case UserIdentityForFactory:
- return "工厂-普通用户"
- default:
- return "未知"
- }
- }
-
- type UserIdentityKind int32
-
- const (
- UserIdentityKindForCommon = 1
- UserIdentityKindForWorker = 2
- )
-
- func (gt UserIdentityKind) String() string {
- switch gt {
- case UserIdentityKindForCommon:
- return "普通用户"
- case UserIdentityKindForWorker:
- return "工作人员"
- default:
- return "未知"
- }
- }
-
- type UserIdentityState int32
-
- const (
- UserIdentityStateForNormal = 1
- UserIdentityStateForFreeze = 2
- )
-
- func (gt UserIdentityState) String() string {
- switch gt {
- case UserIdentityStateForNormal:
- return "正常"
- case UserIdentityStateForFreeze:
- return "冻结"
- default:
- return "未知"
- }
- }
-
- type UserIdentityCertType int32
-
- const (
- UserIdentityCertTypeForIdCard = 1
- UserIdentityCertTypeForStudentId = 2
- UserIdentityCertTypeForPassport = 3
- )
-
- func (gt UserIdentityCertType) String() string {
- switch gt {
- case UserIdentityCertTypeForIdCard:
- return "身份证"
- case UserIdentityCertTypeForStudentId:
- return "学工号"
- case UserIdentityCertTypeForPassport:
- return "护照"
- default:
- return "未知"
- }
- }
-
- func (gt UserIdentityCertType) Format() string {
- switch gt {
- case UserIdentityCertTypeForIdCard:
- return "1"
- case UserIdentityCertTypeForStudentId:
- return "X"
- case UserIdentityCertTypeForPassport:
- return "Y"
- default:
- return ""
- }
- }
|