/*
 * Author: wangjian
 * 生成entity
 */
package com.tofly.pojo.plan;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;


/**
 * 计划下发厂站设备关联表
 *
 * @author admin
 * @date Mon Mar 29 00:00:00 CST 2021
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "tf_ywpn_plan_factory", resultMap = "planFactoryMap")
@ApiModel
public class PlanFactory extends Model<PlanFactory> {
    private static final long serialVersionUID = 1L;

    @TableId(value = "ID", type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty(value = "计划id")
    private Long planId;

    @ApiModelProperty(value = "巡查类型id")
    private Long inspectTypeId;

    @ApiModelProperty(value = "巡查类型转义")
    @TableField(exist = false)
    private String inspectTypeName;

    @ApiModelProperty(value = "污水厂id")
    private Long belongStationId;
    @ApiModelProperty(value = "污水厂名称")
    @TableField(exist = false)
    private String belongStationName;

    @ApiModelProperty(value = "泵站id")
    private Long belongPumpId;
    @ApiModelProperty(value = "泵站名称")
    @TableField(exist = false)
    private String belongPumpName;

    @ApiModelProperty(value = "厂站类型")
    private Long category;

    @TableField(exist = false)
    @ApiModelProperty(value = "厂站类型名称")
    private String categoryName;

    @ApiModelProperty(value = "设备id")
    private Long deviceId;

    @ApiModelProperty(value = "设备名称")
    @TableField(exist = false)
    private String deviceName;

    @ApiModelProperty(value = "设备类型")
    private Long deviceType;
    @TableField(exist = false)
    @ApiModelProperty(value = "设备类型名称")
    private String deviceTypeName;

    @ApiModelProperty(value = "是否到位/维护 0否 1是")
    private String isOver;
    @TableField(exist = false)
    @ApiModelProperty(value = "是否到位 转义")
    private String isOverName;

    @ApiModelProperty(value = "设备是否正常/异常(0正常,1异常)")
    private String isDeviceError;

    @TableField(exist = false)
    @ApiModelProperty(value = "是否正常 转义")
    private String isDeviceErrorName;
    @ApiModelProperty(value = "到位/维护时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date overDate;
    @ApiModelProperty(value = "精度")
    private String longitude;
    @ApiModelProperty(value = "维度")
    private String latitude;
    @ApiModelProperty(value = "地址")
    private String address;

    @ApiModelProperty(value = "附件,多个以,分隔")
    private String fileIds;
    @TableField(exist = false)
    @ApiModelProperty(value = "文件路径列表")
    List<String> filePathList;

    @ApiModelProperty(value = "处理/维护详情")
    private String note;

    @ApiModelProperty(value = "到位人员")
    private Long overUser;

    @TableField(exist = false)
    private String overUserName;

    @ApiModelProperty(value = "到位地址")
    private String overAddress;

    @ApiModelProperty(value = "创建人")
    @TableField(value = "CREATE_USER", fill = FieldFill.INSERT)
    private Long createUser;
    @TableField(exist = false)
    @ApiModelProperty(hidden = true)
    private String createUserName;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "CREATE_TIME", fill = FieldFill.INSERT)
    private Date createTime;

//    @ApiModelProperty(value = "设备详情")
//    @TableField(exist = false)
//    private Device device;
//
//    @ApiModelProperty(value = "厂站详情")
//    @TableField(exist = false)
//    private Stationsiteinfo stationSiteInfo;

    @ApiModelProperty(value = "部门名称")
    @TableField(exist = false)
    private String deptName;

    @ApiModelProperty(value = "污水厂编码")
    @TableField(exist = false)
    private String no;

    @ApiModelProperty(value = "异常设备数")
    @TableField(exist = false)
    private Integer errorDeviceNum;

    @ApiModelProperty(value = "正常设备数")
    @TableField(exist = false)
    private Integer normalDeviceNum;

    @ApiModelProperty(value = "所有设备数")
    @TableField(exist = false)
    private Integer allDeviceNum;

    @ApiModelProperty(value = "巡检厂站设备列表")
    @TableField(exist = false)
    private List<PlanFactory> planDeviceList;

    @ApiModelProperty(value = "巡检工况信息管理")
    @TableField(exist = false)
    private TfYwpnWorkingCondition workingCondition;

    @ApiModelProperty(value = "厂站巡检上报结果表")
    @TableField(exist = false)
    private TfYwpnStationReport stationReport;

}
