package com.inkasso.factoring.common.enums;

/**
 * @Description:销售合同（变更）人员类型
 * @Author:yafan
 */
public enum SalesContractPersonTypeEnum {

    /** 合同签署人 **/
    SALESCONTRACTPERSONTYPE_SIGN("salesContractPersonType_sign", "合同签署人"),
    /** 验收经办人 **/
    SALESCONTRACTPERSONTYPE_ACCEPTANCE("salesContractPersonType_acceptance", "验收经办人"),
    /** 结算经办人 **/
    SALESCONTRACTPERSONTYPE_SETTLEMENT("salesContractPersonType_settlement", "结算经办人");

    /** 编码 ***/
    private String code;
    /** 名称 **/
    private String cname;


    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getCname() {
        return cname;
    }

    public void setCname(String cname) {
        this.cname = cname;
    }

    SalesContractPersonTypeEnum(String code, String cname){
        this.code = code;
        this.cname = cname;
    }

    public static SalesContractPersonTypeEnum getByCode(String code){
        for(SalesContractPersonTypeEnum ft:values()){
            if(ft.code.equals(code)){
                return ft;
            }
        }
        return null;
    }

}
