package org.jeecg.modules.plan.entity;

import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.time.LocalDate;
import java.util.Date;
import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.NoArgsConstructor;
import org.jeecg.modules.workOrder.entity.WorkOrder;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @Description: 检修计划
 * @Author: jeecg-boot
 * @Date:   2025-01-16
 * @Version: V1.0
 */
@Data
@TableName("bu_plan")
@Accessors(chain = true)
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="bu_plan对象", description="检修计划")
public class Plan implements Serializable {
    private static final long serialVersionUID = 1L;

	/**id*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "id")
    private java.lang.String id;
	/**createDept*/
	@Excel(name = "createDept", width = 15)
    @ApiModelProperty(value = "createDept")
    private java.lang.String createDept;
	/**createBy*/
    @ApiModelProperty(value = "createBy")
    private java.lang.String createBy;
	/**createTime*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "createTime")
    private java.util.Date createTime;
	/**updateBy*/
    @ApiModelProperty(value = "updateBy")
    private java.lang.String updateBy;
	/**updateTime*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "updateTime")
    private java.util.Date updateTime;
	/**日期*/
	@Excel(name = "日期", width = 15, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "日期")
    private LocalDate calDay;
	/**calWeek*/
	@Excel(name = "calWeek", width = 15)
    @ApiModelProperty(value = "calWeek")
    private java.lang.Integer calWeek;
	/**设备*/
	@Excel(name = "设备", width = 15)
    @ApiModelProperty(value = "设备")
    @Dict(dictTable = "v_bu_device",dicText = "name",dicCode = "id")
    private java.lang.String deviceId;
	/**修程*/
	@Excel(name = "修程", width = 15)
    @ApiModelProperty(value = "修程")
    @Dict(dicCode = "repair_range")
    private java.lang.Integer rapairRange;
	/**次序*/
	@Excel(name = "次序", width = 15)
    @ApiModelProperty(value = "次序")
    private java.lang.Integer orderNum;

    @TableField(exist = false)
    private WorkOrder workOrder;
    @TableField(exist = false)
    private String coordinator;

    public Plan(String deviceId, Integer rapairRange, LocalDate calDay, Integer calWeek, Integer orderNum) {
        this.deviceId = deviceId;
        this.rapairRange = rapairRange;
        this.calDay = calDay;
        this.calWeek = calWeek;
        this.orderNum = orderNum;
    }
}
