package com.hfkj.channel.saas.saasenum;

import java.util.Objects;

/**
 * SAAS 文件图片
 * @className: FileImgType
 * @author: HuRui
 * @date: 2023/4/5
 **/
public enum FileImgType {

    ID_CARD_FRONT("ID_CARD_FRONT", "身份证正⾯"),
    ID_CARD_BEHIND("ID_CARD_BEHIND", "身份证反⾯"),
    BUSINESS_LICENCE("BUSINESS_LICENCE", "营业执照照⽚"),
    BANK_CARD("BANK_CARD", "银行卡"),
    AGREE_MENT("AGREE_MENT", "协议"),
    OPENING_PERMIT("OPENING_PERMIT", "开户许可证"),
    CHECKSTAND_IMG("CHECKSTAND_IMG", "收银台照片(仅对公进件需传)"),
    SHOP_OUTSIDE_IMG("SHOP_OUTSIDE_IMG", "上传门头照片(仅对公进件需传"),
    SHOP_INSIDE_IMG("SHOP_INSIDE_IMG", "商铺内部照片(仅对公进件需传)"),
    OTHERS("OTHERS", "其他 无对应类型图片，请传其他类型"),
    SETTLE_ID_CARD_FRONT("SETTLE_ID_CARD_FRONT", "结算人身份证人像面"),
    SETTLE_ID_CARD_BEHIND("SETTLE_ID_CARD_BEHIND", "结算人身份证国徽面"),
    LETTER_OF_AUTHORIZATION("LETTER_OF_AUTHORIZATION", "法人授权涵"),
    ;

    private String code;

    private String name;

    FileImgType(String code, String name) {
        this.code = code;
        this.name = name;
    }

    /**
     * 查询数据
     * @param code
     * @return
     */
    public static FileImgType getDataByCode(String code) {
        for (FileImgType ele : values()) {
            if (Objects.equals(code,ele.getCode())) {
                return ele;
            }
        }
        return null;
    }


    public String getCode() {
        return code;
    }

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

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
