attendance_appeal_status.dart 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. import 'package:get/get.dart';
  2. enum AttendanceV2AppealStatusEnum {
  3. StatusInit,
  4. StatusProcessing,
  5. StatusProcessAgree,
  6. StatusProcessDisagree,
  7. StatusAdminDeal
  8. }
  9. extension AttendanceV2AppealStatusEnumExtension on AttendanceV2AppealStatusEnum {
  10. String get name {
  11. switch(this) {
  12. case AttendanceV2AppealStatusEnum.StatusInit:
  13. return 'attendance_appeal_status_init'.tr;
  14. case AttendanceV2AppealStatusEnum.StatusProcessing:
  15. return 'attendance_appeal_status_processing'.tr;
  16. case AttendanceV2AppealStatusEnum.StatusProcessAgree:
  17. return 'attendance_appeal_status_agree'.tr;
  18. case AttendanceV2AppealStatusEnum.StatusProcessDisagree:
  19. return 'attendance_appeal_status_disAgree'.tr;
  20. case AttendanceV2AppealStatusEnum.StatusAdminDeal:
  21. return 'attendance_appeal_status_admin'.tr;
  22. }
  23. }
  24. int get key {
  25. switch(this) {
  26. case AttendanceV2AppealStatusEnum.StatusInit:
  27. return 0;
  28. case AttendanceV2AppealStatusEnum.StatusProcessing:
  29. return 1;
  30. case AttendanceV2AppealStatusEnum.StatusProcessAgree:
  31. return 2;
  32. case AttendanceV2AppealStatusEnum.StatusProcessDisagree:
  33. return 3;
  34. case AttendanceV2AppealStatusEnum.StatusAdminDeal:
  35. return 4;
  36. }
  37. }
  38. }