package com.sckw.core.model.enums;

import lombok.Getter;

/**
 * @author czh
 * @desc 合同审批状态
 * @date 2023/7/14
 */
@Getter
public enum ContractTrackEnum {

    //签约中
    SIGNING(1, "发起签约"),
    //已签约
    SIGNED(0, "已签约"),
    //已完结
    OVER(2, "已完结");

    private final int code;

    private final String name;

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

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

}
