智盟项目
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.

68 lines
1.3 KiB

  1. package enum
  2. type QrcodeBatchState int32
  3. const (
  4. QrcodeBatchStateForUseIng = 1
  5. QrcodeBatchStateForUseAlready = 2
  6. QrcodeBatchStateForExpire = 3
  7. QrcodeBatchStateForCancel = 4
  8. )
  9. func (gt QrcodeBatchState) String() string {
  10. switch gt {
  11. case QrcodeBatchStateForUseIng:
  12. return "使用中"
  13. case QrcodeBatchStateForUseAlready:
  14. return "使用完"
  15. case QrcodeBatchStateForExpire:
  16. return "已过期"
  17. case QrcodeBatchStateForCancel:
  18. return "已作废"
  19. default:
  20. return "未知"
  21. }
  22. }
  23. type QrcodeWithBatchRecordsSate int32
  24. const (
  25. QrcodeWithBatchRecordsStateForWait = 1
  26. QrcodeWithBatchRecordsStateForAlready = 2
  27. QrcodeWithBatchRecordsStateForExpire = 3
  28. QrcodeWithBatchRecordsStateForCancel = 4
  29. )
  30. func (gt QrcodeWithBatchRecordsSate) String() string {
  31. switch gt {
  32. case QrcodeWithBatchRecordsStateForWait:
  33. return "待使用"
  34. case QrcodeWithBatchRecordsStateForAlready:
  35. return "已使用"
  36. case QrcodeWithBatchRecordsStateForExpire:
  37. return "已过期"
  38. case QrcodeWithBatchRecordsStateForCancel:
  39. return "已作废"
  40. default:
  41. return "未知"
  42. }
  43. }
  44. type QrcodeSate int32
  45. const (
  46. QrcodeSateAllowUse = 1
  47. QrcodeSateAllowNotUse = 2
  48. )
  49. func (gt QrcodeSate) String() string {
  50. switch gt {
  51. case QrcodeSateAllowUse:
  52. return "可使用"
  53. case QrcodeSateAllowNotUse:
  54. return "不可用"
  55. default:
  56. return "未知"
  57. }
  58. }