package com.tofly.project.entity;


import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiModel;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.codehaus.jackson.map.annotate.JsonSerialize;
import org.codehaus.jackson.map.ser.std.ToStringSerializer;
import org.springframework.format.annotation.DateTimeFormat;
import lombok.Data;

import java.util.*;

import org.springframework.web.multipart.MultipartFile;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;

import lombok.EqualsAndHashCode;
import com.haiqiu.tools.excel.annotation.Excel;

/**
 * 工程登记(ProjectRegistration)表实体类
 *
 * @author HaiQiu
 * @since 2022-11-14 11:56:46
 */
@Data
@Accessors(chain = true)
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@TableName(value = "FLOW_PROJECT_REGISTRATION", resultMap = "ProjectRegistrationMap")
@ApiModel(value = "ProjectRegistration对象", description = "工程登记")
public class ProjectRegistration extends Model<ProjectRegistration> {

    private static final long serialVersionUID = -45894241212295036L;

    /**
     * 主键ID
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @JsonSerialize(using = ToStringSerializer.class)
    @Excel(name = "主键ID")
    @ApiModelProperty(value = "主键ID")
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 工程名称
     */
    @Excel(name = "工程名称")
    @ApiModelProperty(value = "工程名称")
    private String name;

    /**
     * 工程地址
     */
    @Excel(name = "工程地址")
    @ApiModelProperty(value = "工程地址")
    private String address;

    /**
     * 工程类型（字典取值）
     */
    @Excel(name = "工程类型（字典取值）")
    @ApiModelProperty(value = "工程类型（字典取值）")
    private Long dataType;
    @ApiModelProperty(value = "工程类型（字典取值）")
    @TableField(exist = false)
    private String dataTypeName;

    /**
     * 联系人
     */
    @Excel(name = "联系人")
    @ApiModelProperty(value = "联系人")
    private String contacts;

    /**
     * 联系人电话
     */
    @Excel(name = "联系人电话")
    @ApiModelProperty(value = "联系人电话")
    private String contactsPhone;

    /**
     * 经度
     */
    @Excel(name = "经度")
    @ApiModelProperty(value = "经度")
    private String longitude;

    /**
     * 纬度
     */
    @Excel(name = "纬度")
    @ApiModelProperty(value = "纬度")
    private String latitude;

    /**
     * 备注
     */
    @Excel(name = "备注")
    @ApiModelProperty(value = "备注")
    private String remark;

    /**
     * 登记人
     */
    @Excel(name = "登记人")
    @ApiModelProperty(value = "登记人")
    private String register;

    /**
     * 登记时间
     */
    @Excel(name = "登记时间")
    @ApiModelProperty(value = "登记时间")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date registerTime;

    /**
     * 附件
     */
    @Excel(name = "附件")
    @ApiModelProperty(value = "附件")
    private String annex;

    /**
     * 排序
     */
    @Excel(name = "排序")
    @ApiModelProperty(value = "排序")
    private Long sort;

    /**
     * 逻辑删除，1删除，0不删除
     */
    @Excel(name = "逻辑删除，1删除，0不删除")
    @TableLogic
    @ApiModelProperty(value = "逻辑删除，1删除，0不删除")
    private Boolean deleted;

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

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

    /**
     * 更新时间
     */
    @Excel(name = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    /**
     * 修改人
     */
    @Excel(name = "修改人")
    @ApiModelProperty(value = "修改人")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long updateUser;
    @TableField(exist = false)
    @ApiModelProperty(value = "修改人", hidden = true)
    private String updateUserName;

    /**
     * 编号
     */
    @Excel(name = "编号")
    @ApiModelProperty(value = "编号")
    private String numberNo;



    @TableField(exist = false)
    @ApiModelProperty(value = "工程监管信息集合")
    private List<ProjectSupervision> projectSupervisions;

    @TableField(exist = false)
    @ApiModelProperty(value = "第三方施工监管集合")
    private List<ProjectOtherSupervision> projectOtherSupervisions;
}

