package cn.superdesk.uniorder.common.enums.accounting.operator;

public enum SettlementAmountRuleEnum {

    按订单金额作为结算金额(1, "按订单金额作为结算金额","price"),
    按商品成本总价作为结算金额(2, "按商品成本总价作为结算金额","costPrice"),
    按订单金额和比例作为结算金额(3, "按订单金额和比例作为结算金额","price"),
    ;
    private Integer key;
    private String  desc;
    private String filed;


    SettlementAmountRuleEnum(Integer key, String desc,String filed) {
        this.key = key;
        this.desc = desc;
        this.filed = filed;
    }


    public Integer getKey() {
        return key;
    }

    public String getDesc() {
        return desc;
    }

    public String getFiled() {
        return filed;
    }

    public static SettlementAmountRuleEnum getEnumByKey(Integer key) {
        for (SettlementAmountRuleEnum c : SettlementAmountRuleEnum.values()) {
            if (c.key.equals(key)) {
                return c;
            }
        }
        return null;
    }

}
