package org.dromara.elevator.domain.bo;

import org.dromara.elevator.domain.EMaintenancePlan;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;
import java.util.Date;
import java.util.List;

/**
 * 维保计划;业务对象 e_maintenance_plan
 *
 * @author zy
 * @date 2024-09-03
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = EMaintenancePlan.class, reverseConvertGenerate = false)
public class EMaintenancePlanBo extends BaseEntity {

    /**
     * 主键id
     */
    private Long id;

    /**
     * 电梯编号
     */
    @NotBlank(message = "电梯编号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String elevatorNum;

    /**
     * 计划日期
     */
    @NotNull(message = "计划日期不能为空", groups = { AddGroup.class, EditGroup.class })
    private LocalDate planTime;

    /**
     * 计划类型 （1:定期 2:按需）
     */
    @NotNull(message = "计划类型不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer planType;

    /**
     * 状态
     */
    private Integer state;

    /**
    /**
     * 计划是否完成状态 (0:否,1:是)
     */
    private Integer finishState;

    /**
     * 电梯编号列表
     */
    private List<String> elevatorNumList;

    /**
     * 开始时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    /**
     * 结束时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    /**
     * 部门id
     */
    private Long deptId;

}
