package com.ho.flow.entity;


import com.fasterxml.jackson.annotation.JsonFormat;
import com.ho.common.tools.constant.CommonConstant;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @TableName work_order_plan
 */
@Data
public class WorkOrderPlan implements Serializable {
    /**
     * 
     */
    @ApiModelProperty(value = "工单计划id")
    private Integer id;

    /**
     * 用户id(创建人)
     */
    @ApiModelProperty(value = "用户id(创建人)",hidden = true)
    private String userId;

    /**
     * 集团id
     */
    @ApiModelProperty(value = "集团id ",hidden = true)
    private Integer groupId;

    /**
     * 循环类型(week:周,month:月)
     */
    @ApiModelProperty(value = "循环类型(week:周,month:月)")
    private String dateType;

    /**
     * 定时执行时间
     */
    @ApiModelProperty(value = "定时执行时间")
    private Integer day;

    /**
     * 执行天数
     */
    @ApiModelProperty(value = "执行天数")
    @Min(value = 0,message = "不能小于0天")
    @Max(value = 36500,message = "不能大于36500天")
    private Integer execDay;

    /**
     * 生效日期
     */
    @ApiModelProperty(value = "生效日期")
    @JsonFormat(pattern = CommonConstant.DATE)
    private Date effectDate;

    /**
     * 失效日期
     */
    @ApiModelProperty(value = "失效日期")
    @JsonFormat(pattern = CommonConstant.DATE)
    private Date expireDate;

    /**
     * 工单类型(4:抄表,5:巡检,6:其他)
     */
    @ApiModelProperty(value = "工单类型(4:抄表,5:巡检,6:其他)")
    private Integer orderType;

    /**
     * 计划标题
     */
    @ApiModelProperty(value = "计划标题")
    @Length(max = 50,message = "计划标题不能超过30个字符")
    private String planTitle;

    /**
     * 计划描述
     */
    @ApiModelProperty(value = "计划描述")
    @Length(max = 100,message = "计划描述不能超过100个字符")
    private String desc;

}