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  CodeEnum {


    合同("HT", "HT"),

    农户("NH", "NH"),

    文件("WJ", "WJ"),

    勘察("KC", "KC"),

    货单("HD", "HD"),

    派工单("PG", "PG"),

    档案("DA", "DA"),

    整改单("ZGD", "ZGD");

    /**
     * 名称，描述
     */
    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;
    }

}
