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;

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

    private static final long serialVersionUID = -92509864740802191L;

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

    /**
     * FLOW_PROJECT_REGISTRATION（工程登记ID）
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @JsonSerialize(using = ToStringSerializer.class)
    @Excel(name = "FLOW_PROJECT_REGISTRATION（工程登记ID）")
    @ApiModelProperty(value = "FLOW_PROJECT_REGISTRATION（工程登记ID）")
    private Long projectId;

    /**
     * 施工单位
     */
    @Excel(name = "施工单位")
    @ApiModelProperty(value = "施工单位")
    private String unit;

    /**
     * 施工类型（字典取值）
     */
    @Excel(name = "施工类型（字典取值）")
    @ApiModelProperty(value = "施工类型（字典取值）")
    private Long dataType;

    /**
     * 施工负责人
     */
    @Excel(name = "施工负责人")
    @ApiModelProperty(value = "施工负责人")
    private String contacts;

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

    /**
     * 计划工期
     */
    @Excel(name = "计划工期")
    @ApiModelProperty(value = "计划工期")
    private String plannedDuration;

    /**
     * 施工方（可以取字典，也可以0本公司，1第三方）
     */
    @Excel(name = "施工方（可以取字典，也可以0本公司，1第三方）")
    @ApiModelProperty(value = "施工方（可以取字典，也可以0本公司，1第三方）")
    private Long constructor;

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

    /**
     * 计划完工时间
     */
    @Excel(name = "计划完工时间")
    @ApiModelProperty(value = "计划完工时间")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date plannedEndTime;

    /**
     * 计划开工时间
     */
    @Excel(name = "计划开工时间")
    @ApiModelProperty(value = "计划开工时间")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date plannedStartTime;

    /**
     * 附件
     */
    @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;


    /**
     * 工程登记
     */
    @ApiModelProperty(value = "工程登记")
    @TableField(exist = false)
    private ProjectRegistration registration;


}

