package com.template.model.enumModel; /** * @Author: binguo * @Date: 2023/7/26 星期三 14:55 * @Description: com.repair.model.enumModel * @Version: 1.0 */ public enum eWeekStatu { Monday(1),//周一 Tuesday(2),//周二 Wednesday(3),//周三 Thursday(4),//周四 Friday(5),//周五 Saturday(6),//周六 Sunday(7);//周天 private int value; eWeekStatu(int value){ this.value = value; } public int getValue() { return value; } public static eWeekStatu valueOf(int value) { switch (value) { case 1: return eWeekStatu.Monday; case 2: return eWeekStatu.Tuesday; case 3: return eWeekStatu.Wednesday; case 4: return eWeekStatu.Thursday; case 5: return eWeekStatu.Friday; case 6: return eWeekStatu.Saturday; case 7: return eWeekStatu.Sunday; default: return null; } } public static String stringOf(Integer value) { switch (value) { case 1: return "周一"; case 2: return "周二"; case 3: return "周三"; case 4: return "周四"; case 5: return "周五"; case 6: return "周六"; case 7: return "周天"; default: return null; } } }