package com.hotent.project.model;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.hotent.base.entity.BaseModel;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.util.List;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

/**
 * 项目任务表
 *
 * @company 山西清众科技股份有限公司
 * @author 超级管理员
 * @since 2025-10-03
 */
@ApiModel(value="CostProjectTask对象", description="项目任务表")
@Data
public class CostProjectTask extends BaseModel<CostProjectTask> {

    private static final long serialVersionUID = 1L;
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @JsonProperty("id")
    private String id;

    @ApiModelProperty(value = "立项年度")
    @TableField("year")
    @JsonProperty("year")
    private String year;

    @ApiModelProperty(value = "项目id")
    @TableField("project_id")
    @JsonProperty("projectId")
    private String projectId;

    @ApiModelProperty(value = "父id")
    @TableField("pid")
    @JsonProperty("pid")
    private String pid;

    @ApiModelProperty(value = "成本监审项目名称")
    @TableField("project_name")
    @JsonProperty("projectName")
    private String projectName;

    @ApiModelProperty(value = "被监审单位id")
    @TableField("audited_unit_id")
    @JsonProperty("auditedUnitId")
    private String auditedUnitId;


    @ApiModelProperty(value = "被监审单位名称")
    @TableField("audited_unit_name")
    @JsonProperty("auditedUnitName")
    private String auditedUnitName;

    @ApiModelProperty(value = "监审期间")
    @TableField("audit_period")
    @JsonProperty("auditPeriod")
    private String auditPeriod;

    @ApiModelProperty(value = "立项来源")
    @TableField("source_type")
    @JsonProperty("sourceType")
    private String sourceType;

    @ApiModelProperty(value = "监审形式")
    @TableField("audit_type")
    @JsonProperty("auditType")
    private String auditType;

    @ApiModelProperty(value = "当前节点")
    @TableField("current_node")
    @JsonProperty("currentNode")
    private String currentNode;

    @ApiModelProperty(value = "当前节点")
    @TableField(exist = false)
    private String currentNodeName;

    @ApiModelProperty(value = "状态  100待提交、200审核中、400办结、300中止")
    @TableField("status")
    @JsonProperty("status")
    private String status;

    @ApiModelProperty(value = "状态名称")
    @TableField(exist = false)
    private String statusName;

    @ApiModelProperty(value = "序号")
    @TableField("order_num")
    @JsonProperty("orderNum")
    private Integer orderNum;

    @ApiModelProperty(value = "逻辑删除：0正常 1删除")
    @TableField("is_deleted")
    @JsonProperty("isDeleted")
    private String isDeleted;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @JsonProperty("createTime")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "创建人")
    @TableField(value = "create_by", fill = FieldFill.INSERT)
    @JsonProperty("createBy")
    private String createBy;

    @ApiModelProperty(value = "更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    @JsonProperty("updateTime")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "更新人")
    @TableField(value = "update_by", fill = FieldFill.INSERT_UPDATE)
    @JsonProperty("updateBy")
    private String updateBy;

    @ApiModelProperty(value = "子任务列表")
    @TableField(exist = false)
    @JsonProperty("childTasks")
    private List<CostProjectTask> childTasks;

    @ApiModelProperty(value = "是否归档")
    @TableField("is_gd")
    @JsonProperty("isGd")
    private String isGd;

    @TableField(exist = false)
    private String catalogId;
    @TableField(exist = false)
    private String areaName;

    @TableField(exist = false)
    private String auditTypeName;

    @TableField(exist = false)
    private String orgName;

    @ApiModelProperty(value = "预警状态：green-绿色预警(在办理期限内) yellow-黄色预警(超过环节期限但没超过流程期限) red-红色预警(超过流程期限)")
    @TableField(exist = false)
    @JsonProperty("warningStatus")
    private String warningStatus;

    @ApiModelProperty(value = "卷宗生成状态：0-未生成 1-生成中 2-已生成 3-生成失败")
    @TableField("archive_status")
    @JsonProperty("archiveStatus")
    private String archiveStatus;

    @ApiModelProperty(value = "最终卷宗URL")
    @TableField("archive_url")
    @JsonProperty("archiveUrl")
    private String archiveUrl;

    @ApiModelProperty(value = "卷宗生成时间")
    @TableField("archive_time")
    @JsonProperty("archiveTime")
    private LocalDateTime archiveTime;

    @ApiModelProperty(value = "卷宗号")
    @TableField("archive_no")
    @JsonProperty("archiveNo")
    private String archiveNo;

    @ApiModelProperty(value = "归档人")
    @TableField("archive_user")
    @JsonProperty("archiveUser")
    private String archiveUser;

}
