package com.gxwebsoft.tower.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.gxwebsoft.common.system.entity.User;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

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

/**
 * 项目管理
 *
 * @author 科技小王子
 * @since 2023-05-22 13:30:39
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "TowerProject对象", description = "项目管理")
public class TowerProject implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "自增ID")
    @TableId(value = "project_id", type = IdType.AUTO)
    private Integer projectId;

    @ApiModelProperty(value = "项目名称")
    private String projectName;

    @ApiModelProperty(value = "项目图片")
    private String projectImage;

    @ApiModelProperty(value = "租赁单位")
    private String companyName;

    @ApiModelProperty(value = "租赁单位")
    private Integer companyId;

    @ApiModelProperty(value = "承租单位")
    private String customerName;

    @ApiModelProperty(value = "承租单位")
    private Integer customerId;

    @ApiModelProperty(value = "项目地址")
    private String projectRegion;

    @ApiModelProperty(value = "项目所在地")
    private String projectCity;

    @ApiModelProperty(value = "详细地址")
    private String projectAddress;

    @ApiModelProperty(value = "经度")
    private String longitude;

    @ApiModelProperty(value = "纬度")
    private String latitude;

    @ApiModelProperty(value = "报监编号")
    private String superviseNo;

    @ApiModelProperty(value = "施工许可证")
    private String licenceNo;

    @ApiModelProperty(value = "安全状态")
    private String securityStatus;

    @ApiModelProperty(value = "主管部门")
    private String competentDepartment;

    @ApiModelProperty(value = "安拆单位")
    private String dismantlingCompany;

    @ApiModelProperty(value = "汽吊规格")
    private String truckCraneSpecs;

    @ApiModelProperty(value = "合同其他说明")
    private String contract;

    @ApiModelProperty(value = "项目负责人")
    private String director;

    @TableField(exist = false)
    private User directorUser;

    @ApiModelProperty(value = "项目经理")
    private String projectDirector;

    @ApiModelProperty(value = "项目状态")
    private String projectStatus;

    @ApiModelProperty(value = "业务员")
    private String salesman;

    @ApiModelProperty(value = "标地列表")
    private String  placeList;

    @ApiModelProperty(value = "最后生成保养计划的月份")
    private Integer planMonth;

    @ApiModelProperty(value = "状态, 0待发布, 1已发布")
    private Integer status;

    @ApiModelProperty(value = "备注")
    private String comments;

    @ApiModelProperty(value = "排序号")
    private Integer sortNumber;

    @ApiModelProperty(value = "所有人")
    private Integer userId;

    @ApiModelProperty(value = "是否删除, 0否, 1是")
    @TableLogic
    private Integer deleted;

    @ApiModelProperty(value = "租户id")
    private Integer tenantId;

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

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

    @ApiModelProperty(value = "项目成员")
    @TableField(exist = false)
    private Set<TowerProjectUser> users;

    @ApiModelProperty(value = "合同预定设备清单")
    @TableField(exist = false)
    private Set<TowerProjectOrder> orders;

    @ApiModelProperty(value = "检查部位配置")
    @TableField(exist = false)
    private Set<TowerProjectPlace> places1;

    @ApiModelProperty(value = "保养部位配置")
    @TableField(exist = false)
    private Set<TowerProjectPlace> places2;

    @ApiModelProperty(value = "是否已有安装单派单")
    @TableField(exist = false)
    private boolean hasSetUpWorksheet;

    @ApiModelProperty(value = "派单类型")
    @TableField(exist = false)
    private Integer worksheetType;

    @ApiModelProperty(value = "派单设备类型")
    @TableField(exist = false)
    private Integer worksheetEquipType;

    @ApiModelProperty(value = "各派单类型数量")
    @TableField(exist = false)
    private Map<Integer, Integer> worksheetWorkTypeNumList;

    @ApiModelProperty(value = "关联设备数")
    @TableField(exist = false)
    private Integer equipmentNum;
}
