package com.ho.flow.entity;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @TableName work_order
 */
@Data
public class WorkOrder implements Serializable {
    /**
     * id Snowflake
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;
    /**
     * 分组id
     */
    private Integer groupId;
    /**
     * 电站id
     */
    private Integer stationId;
    //用户id
    private String userId;

    //告警id
    @JsonSerialize(using = ToStringSerializer.class)
    private Long eventId;
    /**
     * 工单号
     */
    private String orderId;

    /**
     * 流程id
     */
    private String processId;
    /**
     * 设备id
     */
    private Integer deviceId;


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

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

    /**
     * 计划处理时间
     */
    //@DateTimeFormat(pattern = CommonConstant.DATE)
    @ApiModelProperty(value = "计划处理时间")
    private Date plannedTime;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    /**
     * 修改时间
     */
    @ApiModelProperty(value = "修改时间")
    private Date updateTime;

    /**
     * 优先级 ,可以从字典定义取值
     */
    @ApiModelProperty(value = "优先级")
    private Integer priority;

    /**
     * 电话
     */
    @ApiModelProperty(value = "电话")
    private String phone;

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

    /**
     * 工单类型
     */
    @ApiModelProperty(value = "工单类型 1:故障检修单 2:电站巡检单 3:电站清洗单")
    private Integer orderType;

    /**
     * 删除标识
     */
    private Integer deleted;
}