package com.ltgk.port.domain.dto;

import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ltgk.common.core.page.BasePage;
import com.ltgk.common.validation.groups.Detail;
import com.ltgk.common.validation.groups.Update;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 建设工程基本信息数据传输对象
 *
 * @author Qi ChengBin
 * @date 2024-12-26
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value = "建设工程基本信息数据传输对象", description = "建设工程基本信息数据传输对象")
public class PpConstructionWorkBaseDTO extends BasePage {

    @ApiModelProperty(value = "建设工程基本信息主键")
    @NotNull(message = "建设工程基本信息主键不能为空", groups = {Update.class, Detail.class})
    private String id;

    @ApiModelProperty(value = "项目编号")
    private String projectCode;

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

    @ApiModelProperty(value = "具体位置")
    private String location;

    @ApiModelProperty(value = "建设规模")
    private String scale;

    @ApiModelProperty(value = "供应商")
    private String suppliers;

    @ApiModelProperty(value = "建设单位")
    private String constructionOrg;

    @ApiModelProperty(value = "承建单位")
    private String contractorOrg;

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

    @ApiModelProperty(value = "项目负责人联系方式")
    private String principalPhone;

    @ApiModelProperty(value = "中央资金")
    @Min(value = 0, message = "中央资金不能小于0")
    private BigDecimal centralFunds = new BigDecimal("0");

    @ApiModelProperty(value = "省资金")
    @Min(value = 0, message = "省资金不能小于0")
    private BigDecimal provincialFunds = new BigDecimal("0");

    @ApiModelProperty(value = "市资金")
    @Min(value = 0, message = "市资金不能小于0")
    private BigDecimal cityFunds = new BigDecimal("0");

    @ApiModelProperty(value = "区资金")
    @Min(value = 0, message = "区资金不能小于0")
    private BigDecimal districtFunds = new BigDecimal("0");

    @ApiModelProperty(value = "社会资金")
    @Min(value = 0, message = "社会资金不能小于0")
    private BigDecimal socialFunds = new BigDecimal("0");

    @ApiModelProperty(value = "总资金")
    private BigDecimal funds = new BigDecimal("0");

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ApiModelProperty(value = "计划开始时间")
    private Date planBeginTime;

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ApiModelProperty(value = "计划结束时间")
    private Date planEndTime;

    @ApiModelProperty(value = "工期")
    private String duration;

    @ApiModelProperty(value = "行政区域编码")
    private String areaCode;

    @ApiModelProperty(value = "行政区域名称")
    private String areaName;

    @ApiModelProperty(value = "创建者")
    private String createBy;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "创建时间")
    private Date createAt;

    @ApiModelProperty(value = "更新者")
    private String updateBy;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "更新时间")
    private Date updateAt;

    @TableLogic(delval = "1", value = "0")
    @ApiModelProperty(value = "删除标志: 0-未删除, 1-已删除")
    private Integer delFlag;

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

    @ApiModelProperty(value = "开始时间")
    private String startTime;

    @ApiModelProperty(value = "结束时间")
    private String endTime;

    @ApiModelProperty(value = "当前进度")
    private Integer schedule;

    @ApiModelProperty(value = "已使用资金额度")
    private BigDecimal spentFunds;

    @ApiModelProperty(value = "当前阶段")
    private String stageName;

    @ApiModelProperty(value = "是否超预算：0否1是")
    private String isOver;

    @ApiModelProperty(value = "部门ID")
    private String deptId;

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

    @ApiModelProperty(value = "项目 id")
    private String projectId;
}
