package com.yeejoin.amos.boot.module.hygf.api.Enum;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @description:
 * @author: tw
 * @createDate: 2023/12/13
 */
@Getter
@AllArgsConstructor
public enum WorkOrderEnum {


    待施工("待施工", "待施工"),

    施工中("施工中", "施工中"),

    待登记("待登记", "待登记"),

    登记中("登记中", "登记中"),

    审核中("审核中", "审核中"),

    待审核("待审核", "待审核"),


    未通过("未通过", "未通过"),

    已完工("已完工", "已完工");

    /**
     * 名称，描述
     */
    private String name;
    /**
     * 编码
     */
    private String code;

    public static ContractStatusEnum getNodeByCode(String code) {
        ContractStatusEnum dealerReviewEnum = null;
        for(ContractStatusEnum type: ContractStatusEnum.values()) {
            if (type.getCode().equals(code)) {
                dealerReviewEnum = type;
                break;
            }
        }
        return dealerReviewEnum;
    }

}
