package com.ltgk.common.enums;

/**
 * @Author: wan kun
 * @Description: 项目报告类型
 * @Date: 2025/1/15 17:38
 * @Version: 1.0
 */
public enum WorkReportType {
    //报告类型 1日报 2周报 3月报
    DAILY_REPORT(1, "日报"),
    WEEKLY_REPORT(2, "周报"),
    MONTHLY_REPORT(3, "月报");
    private final Integer code;
    private final String message;

    WorkReportType(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    public static WorkReportType getByCode(Integer code) {
        for (WorkReportType workReportType : WorkReportType.values()) {
            if (workReportType.getCode().equals(code)) {
                return workReportType;
            }
        }
        return null;
    }
}
