package com.yunyan.business.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yunyan.common.annotation.Excel;

import com.yunyan.common.core.domain.BaseEntity;
import com.yunyan.common.core.domain.BaseEntityVo;
import lombok.Data;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.annotation.*;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
import lombok.Builder;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.fasterxml.jackson.annotation.JsonIgnore;

/**
 * 报告-文件相关(附件)对象 tb_report_file
 *
 * @author yunyan
 * @date 2023-12-21
 */
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Data
@TableName(value = "tb_report_file")
public class ReportFile extends BaseEntityVo
{
    private static final long serialVersionUID = 1L;

    /** ID主键 */
    @JsonSerialize(using= ToStringSerializer.class)
    @TableId(value = "id", type = IdType.INPUT)
    @ApiModelProperty(value = "ID主键", hidden = true)
    private Long id;

    /** 报告ID */
    @ApiModelProperty(value = "报告ID", hidden = true)
    private Long reportId;

    /** 类型: 1-附件 */
    @ApiModelProperty(value = "类型: 1-附件", hidden = true)
    private Long type;

    /** 文档的内容 json */
    @ApiModelProperty(value = "文档的内容 json", hidden = true)
    private String fileContent;

    /** 文件名/标题 */
    @ApiModelProperty(value = "文件名/标题", hidden = true)
    private String fileName;

    /** 文件的保存url位置 */
    @ApiModelProperty(value = "文件的保存url位置", hidden = true)
    private String fileUrl;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间", hidden = true)
    private Date createTime;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.UPDATE)
    @ApiModelProperty(value = "更新时间", hidden = true)
    private Date updateTime;

    /** 创建者 */
    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建者", hidden = true)
    private String createBy;

    /** 更新者 */
    @TableField(fill = FieldFill.UPDATE)
    @ApiModelProperty(value = "更新者", hidden = true)
    private String updateBy;

    /** 逻辑删除(1-删除，0-未删) */
            //逻辑删除（就是在delete字段做标记，不是真正意义上的删除）
    @JsonIgnore
    @TableLogic(value = "0",delval = "1")
    @TableField(select = false)
    @ApiModelProperty(value = "逻辑删除(1-删除，0-未删)", hidden = true)
    private Long deleted;



}
