package com.smppw.modaq.domain.dto.report;

import com.smppw.modaq.domain.entity.report.ReportAssetAllocationDO;
import lombok.Getter;
import lombok.Setter;

/**
 * @author wangzaijun
 * @date 2024/9/26 16:43
 * @description 基金资产组合情况
 */
@Setter
@Getter
public class ReportAssetAllocationDTO extends BaseReportDTO<ReportAssetAllocationDO> {
    /**
     * 资产大类
     */
    private String assetType;
    /**
     * 资产明细
     */
    private String assetDetails;
    /**
     * 市值
     */
    private String marketValue;
    /**
     * 备注
     */
    private String remark;

    public ReportAssetAllocationDTO() {
        super();
    }

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

    @Override
    public ReportAssetAllocationDO toEntity() {
        ReportAssetAllocationDO entity = new ReportAssetAllocationDO();
        entity.setFileId(this.getFileId());
        entity.setAssetType(this.assetType);
        entity.setColumnName(this.assetDetails);
        entity.setMarketValue(this.toBigDecimal(this.marketValue));
        entity.setRemark(this.remark);
        return entity;
    }

    @Override
    public String toString() {
        return "{" +
                super.toString() +
                ", assetType='" + assetType + '\'' +
                ", assetDetails='" + assetDetails + '\'' +
                ", marketValue=" + marketValue +
                ", remark='" + remark + '\'' +
                '}';
    }
}
