package com.gxwebsoft.ai.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 审计报告表
 *
 * @author yc
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "AuditReport 对象", description = "审计报告表")
@TableName("audit_report")
public class AuditReport implements Serializable {
    private static final long serialVersionUID = 1L;

    @Schema(description = "主键 ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "项目编号")
    private Integer projectId;

    @Schema(description = "项目名称")
    private String projectName;

    @Schema(description = "案引号")
    private String caseIndex;

    @Schema(description = "被审计单位")
    private String auditedTarget;

    @Schema(description = "报告内容（JSON 格式，包含 sections 和 previewHtml）")
    private String reportContent;

    @Schema(description = "报告预览 HTML")
    private String previewHtml;

    @Schema(description = "章节数量")
    private Integer sectionCount;

    @Schema(description = "用户 ID")
    private Integer userId;

    @Schema(description = "用户名")
    private String username;

    @Schema(description = "状态，0 正常，1 冻结")
    private Integer status;

    @Schema(description = "是否删除，0 否，1 是")
    @TableLogic
    private Integer deleted;

    @Schema(description = "租户 id")
    private Integer tenantId;

    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @Schema(description = "修改时间")
    private LocalDateTime updateTime;

    @Schema(description = "表单提交标识，用于判断记录是否存在")
    private Integer formCommit;

    @TableField(exist = false)
    private Boolean success;
}
