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.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.hotent.base.entity.BaseModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 成本监审立项主表
 *
 * @company 山西清众科技股份有限公司
 * @author 超级管理员
 * @since 2025-09-22
 */
@ApiModel(value="CostProjectApproval对象", description="成本监审立项主表")
@Data
public class CostProjectApproval extends BaseModel<CostProjectApproval> {

    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "主键ID")
    @TableId(value = "project_id", type = IdType.ASSIGN_ID)
    @JsonProperty("projectId")
    private String projectId;

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

    @ApiModelProperty(value = "关联成本监审目录ID")
    @TableField("catalog_id")
    @JsonProperty("catalogId")
    private String catalogId;

    @ApiModelProperty(value = "计划id")
    @TableField("plan_id")
    @JsonProperty("planId")
    private String planId;

    @ApiModelProperty(value = "区域编码")
    @TableField("area_code")
    @JsonProperty("areaCode")
    private String areaCode;

    @ApiModelProperty(value = "区域级别")
    @TableField("area_level")
    @JsonProperty("areaLevel")
    private String areaLevel;

    @ApiModelProperty(value = "区域名称")
    @TableField(exist = false)
    private String areaName;

    @ApiModelProperty(value = "监审主体")
    @TableField("org_id")
    @JsonProperty("orgId")
    private String orgId;

    @ApiModelProperty(value = "归属年度")
    @TableField("project_year")
    @JsonProperty("projectYear")
    private String projectYear;

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

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

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

    @ApiModelProperty(value = "是否参加听证 0是 1否")
    @TableField("need_hearing")
    @JsonProperty("needHearing")
    private String needHearing;

    @ApiModelProperty(value = "是否应急项目  0是 1否")
    @TableField("is_emergency")
    @JsonProperty("isEmergency")
    private String isEmergency;

    @ApiModelProperty(value = "立项理由")
    @TableField("establishment_reason")
    @JsonProperty("establishmentReason")
    private String establishmentReason;

    @ApiModelProperty(value = "立项依据")
    @TableField("according_file_url")
    @JsonProperty("accordingFileUrl")
    private String accordingFileUrl;

    @ApiModelProperty(value = "其他专家")
    @TableField("other_file_url")
    @JsonProperty("otherFileUrl")
    private String otherFileUrl;

    @ApiModelProperty(value = "项目状态")
    @TableField("status")
    @JsonProperty("status")
    private String status;
    @TableField(exist = false)
    private String statusName;
    @TableField(exist = false)
    private String currentNode;
    @TableField(exist = false)
    private String currentNodeName;

    @ApiModelProperty(value = "监审任务负责人ID")
    @TableField("leader_id")
    @JsonProperty("leaderId")
    private String leaderId;

    @ApiModelProperty(value = "专家姓名")
    @TableField("expert_str")
    @JsonProperty("expertStr")
    private String expertStr;

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


    @ApiModelProperty(value = "监审组人员")
    @TableField("audit_group")
    @JsonProperty("auditGroup")
    private String auditGroup;


    @ApiModelProperty(value = "发送方式")
    @TableField("send_type")
    @JsonProperty("sendType")
    private String sendType;


    @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("project_members")
    @JsonProperty("projectMembers")
    private String projectMembers;

    @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("org_name")
    @JsonProperty("orgName")
    private String orgName;

    // 子任务对象（非数据库字段）
    @ApiModelProperty(value = "当前用户对应的子任务")
    @TableField(exist = false)
    private CostProjectTask userTask;

}
