package com.sckw.core.model.enums;

import lombok.Getter;

/**
 * @author czh
 * @desc 签约方式
 * @date 2023/7/14
 */
@Getter
public enum SigningWayEnum {

    //线上签约
    ONLINE(1, "线上签约"),
    //线下签约
    OFFLINE(2, "线下签约");

    private final int code;

    private final String name;

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

    public static SigningWayEnum getName(int code){
        for (SigningWayEnum signingWayEnum : values()) {
            if (signingWayEnum.getCode() == code) {
                return signingWayEnum;
            }
        }
        return null;
    }
}
