package com.cool.store.enums;

/**
 * @author byd
 * @date 2024-04-30 15:54
 */
public enum AssessmentTemplateType {

    TRAINER(0, "教练员"),
    STORE_MANAGER(1, "店长"),
    CLERK(2, "店员"),
    TRIPARTITE_ACCEPTANCE(3, "三方验收"),
    ;

    private Integer code;

    private String name;

    private AssessmentTemplateType(Integer code, String name) {
        this.code = code;
        this.name = name;
    }

    public Integer getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public static AssessmentTemplateType getByCode(Integer code) {
        for (AssessmentTemplateType auditStatusEnum : AssessmentTemplateType.values()) {
            if (auditStatusEnum.getCode().equals(code)) {
                return auditStatusEnum;
            }
        }
        return null;
    }
}
