package org.springblade.modules.app.common.enums;

public enum MessageEnum {

    BIND_APPLICATION(1, "您有一条代宰户绑定申请，请及时查看。"),
    BIND_SUCCESS(2, "您提交的屠宰场绑定申请已通过。"),
    BIND_FAILED(3, "您提交的屠宰场绑定申请被拒绝。"),
    SLAUGHTER_HOUSE_UNBOUND(4, "您关联的代宰户已与您解绑。"),
    SLAUGHTER_UNBOUND(5, "您关联的屠宰场已与您解绑。"),
    WAYBILL_CREATE(6, "您有一条新订单，请及时查看。"),
    WAYBILL_REJECT(7, "您的订单被拒绝，请及时查看。"),
    WAYBILL_ADOPT(8, "您的备案单已通过审批，请及时查看。"),
    WAYBILL_FAIL(9, "您的备案单审批被拒绝，请及时查看。"),
    TRANSPORT_CREATE(10, "您有一条新的运输单，请及时查看。"),
    TRANSPORT_ADOPT(11, "您呼叫的司机已接单，请及时查看。"),
    TRANSPORT_FAIL(12, "您呼叫的司机已拒绝，请及时更换司机。"),
    VERIFY_STATION_ADOPT(13, "您的货物已进入浙江省。"),
    VERIFY_STATION_FAIL(14, "您的货物未通过省界检查，请及时查看。"),
    RECEIVE_VOUCHER_UPLOAD(15, "您有新的 验收单待确认，请及时查看。"),
    RECEIVE_SUCCESS_DRIVER(16, "您的运输单验收成功，请及时查看"),
    RECEIVE_SUCCESS_OTHER(17, "您的货物验收成功，请及时查看。"),
    RECEIVE_FAIL_DRIVER(18, "您的运输单验收失败，请及时查看。"),
    RECEIVE_FAIL_OTHER(19, "您的货物验收失败，请及时查看。"),
    WAYBILL_SLAUGHTER(20, "您有一条代宰户备案申请，请及时查看。"),
    WAYBILL_SLAUGHTER_REJECT(21, "您的备案申请被屠宰场拒接，请及时查看。"),
    WAYBILL_SLAUGHTER_ADOPT(22, "您的备案申请被屠宰场确认，请及时查看。"),
    ;

    private int code;
    private String text;

    MessageEnum(int code, String text) {
        this.code = code;
        this.text = text;
    }

    public int getCode() {
        return code;
    }

    public String getText() {
        return text;
    }

    public static MessageEnum findByCode(int code) {
        for (MessageEnum demoEnum : values()) {
            if (code == demoEnum.getCode()) {
                return demoEnum;
            }
        }
        return null;
    }

}
