package com.sqx.modules.printInfo.entity;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author: binguo
 * @Date: 2023/7/6 星期四 16:34
 * @Description: com.template.model.enumModel
 * @Version: 1.0
 * 订单类型
 */
//到店取餐：1
//骑手配送：2
//商家配送：3
public enum eOrderTypeExtra {
    Door(1),//到店取餐
    Rider(2),//骑手配送
    Store(3);//商家配送

    private int value;

    eOrderTypeExtra(int value){
        this.value = value;
    }

    public int getValue() {
        return value;
    }
    public static eOrderTypeExtra valueOf(int value) {
        switch (value) {
            case 1:
                return eOrderTypeExtra.Door;
            case 2:
                return eOrderTypeExtra.Rider;
            case 3:
                return eOrderTypeExtra.Store;
            default:
                return null;
        }
    }

    public static Integer integerOf(String value) {
        switch (value) {
            case "到店取餐":
                return 1;
            case "骑手配送":
                return 2;
            case "商家配送":
                return 3;
            default:
                return null;
        }
    }

    public static String stringOf(Integer value) {
        switch (value) {
            case 1:
                return "到店取餐";
            case 2:
                return "骑手配送";
            case 3:
                return "商家配送";
            default:
                return null;
        }
    }

    /**
     * 获取考勤状态集合
     * @return
     */
    public static List<Integer> attendanceStatus(){
        List<Integer> result = new ArrayList<>();
        result.add(0);
        result.add(1);
        result.add(3);
        result.add(6);
        result.add(7);
        return result;
    }
}
