package com.sckw.core.model.enums;

import lombok.Getter;

/**
 * @author czh
 * @desc 合作单位申请类型枚举
 * @date 2023/6/15
 */
@Getter
public enum CooperateApplyTypeEnum {

    //我方发起
    US(1, "我方发起"),
    //对方发起
    TARGET(2, "对方发起");

    private final int code;

    private final String name;

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

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

}