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

public enum SettlementRuleEnum {
    结算金额(1, "账单金额=账单结算订单的结算金额"),
    结算金额_合作分润_服务费(2, "账单金额=账单结算订单的结算金额-合作分润+服务费"),
    结算金额_合作分润(3, "账单金额=账单结算订单的结算金额-合作分润"),
    结算金额_服务费(4, "账单金额=账单结算订单的结算金额+服务费"),
    ;
    private Integer key;
    private String  desc;

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


    public Integer getKey() {
        return key;
    }

    public String getDesc() {
        return desc;
    }

    public static String getDescByKey(Integer key) {
        for (SettlementRuleEnum c : SettlementRuleEnum.values()) {
            if (c.key.equals(key)) {
                return c.getDesc();
            }
        }
        return "";
    }
}
