package cn.com.ty.lift.business.maintenance.dao.entity.model.request;

import cn.com.ty.lift.common.model.PageRequest;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.PastOrPresent;
import java.time.LocalDate;

/**
 * <p>维保计划请求model</p>
 * @author wcz
 * @since 2020/1/17
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class MtPlanRequest extends PageRequest {

    /**
     * 主键id
     */
    @Min(value = 1, message = "维保计划ID有误")
    private Long id;

    /**
     * 区域id
     */
    @Min(value = 1, message = "区域ID有误")
    private Long regionId;
    /**
     * 项目id
     */
    @Min(value = 1, message = "项目ID有误")
    private Long projectId;
    /**
     * 维保工id
     */
    @Min(value = 1, message = "维保工ID有误")
    private Long workerId;
    /**
     * 计划开始时间
     */
    private LocalDate planBegin;
    /**
     * 计划结束时间
     */
    private LocalDate planEnd;
    /**
     * 执行时间
     */
    @NotNull(message = "缺少计划执行时间")
    @PastOrPresent(message = "计划执行时间不得早于当前时间")
    private LocalDate workDate;
    /**
     * 公司id
     */
    @Min(value = 1, message = "维保公司ID有误")
    private Long mtCompanyId;

}
