package com.sckw.payment.model.constant;

/**
 * @author Aick Spt
 * @date 2023-07-27 12:49
 */
public enum SettlementOrderTypeEnum {
        LOGISTICS(1, "物流"),
        TRADE(2, "贸易");

        private int status;
        private String desc;

    SettlementOrderTypeEnum(int status, String desc) {
            this.status = status;
            this.desc = desc;
        }

        public int getStatus() {
            return status;
        }

        public void setStatus(int status) {
            this.status = status;
        }

        public String getDesc() {
            return desc;
        }

        public void setDesc(String desc) {
            this.desc = desc;
        }

        // 添加静态方法，根据 status 获取对应的 desc
        public static String getStatusDesc(int status) {
            for (SettlementOrderTypeEnum settlementOrderTypeEnum : values()) {
                if (settlementOrderTypeEnum.getStatus() == status) {
                    return settlementOrderTypeEnum.getDesc();
                }
            }
            // 可根据实际需求返回默认值或其他处理
            return null;
        }


    }

