package com.simuwang.base.pojo.dto.report;

import com.simuwang.base.pojo.dos.report.ReportBaseInfoDO;
import lombok.Getter;
import lombok.Setter;

/**
 * @author wangzaijun
 * @date 2024/9/26 16:44
 * @description 基协报告基础信息表
 */
@Setter
@Getter
public class ReportBaseInfoDTO extends BaseReportDTO<ReportBaseInfoDO> {
    /**
     * 报告日期
     */
    private String reportDate;
    /**
     * 报告名称
     */
    private String reportName;
    /**
     * 报告类型
     */
    private String reportType;

    public ReportBaseInfoDTO() {
        super();
    }

    public ReportBaseInfoDTO(Integer fileId) {
        super(fileId);
    }

    @Override
    public ReportBaseInfoDO toEntity() {
        ReportBaseInfoDO entity = new ReportBaseInfoDO();
        entity.setFileId(this.getFileId());
        entity.setReportDate(this.toDate(this.reportDate));
        entity.setReportName(this.reportName);
        entity.setReportType(this.reportType);
        return entity;
    }

    @Override
    public String toString() {
        return "{" +
                super.toString() +
                ", reportDate='" + reportDate + '\'' +
                ", reportName='" + reportName + '\'' +
                ", reportType='" + reportType + '\'' +
                '}';
    }
}
