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 {


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

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

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

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

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

    待审核("待审核", "待审核"),
    经销商工程待审核("经销商工程待审核", "经销商工程待审核"),
    片区运营待审核("片区运营待审核", "area"),
    设计待审核("设计待审核", "design"),
    工程待审核("工程待审核", "engineering"),

    待提交("待提交", "待提交"),

    整改待审核("整改待审核", "整改待审核"),
    已完成("已完成", "已完成"),
    已作废("已作废", "已作废"),
    待整改("待整改", "待整改"),

    整改中("整改中", "整改中"),

    未通过("未通过", "未通过"),
    全部节点("全部节点", "all"),

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

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

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

}
