package com.microservices.pms.journals.domain.vo;

import com.microservices.common.core.web.page.TableDataInfo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

/**
 * 评论功能对象 pms_journals
 * 
 * @author otto
 * @date 2023-11-01
 */
@Data
@ApiModel("评论列表对象")
public class PmsJournalsDataTableVo
{
    @ApiModelProperty(value = "评论列表")
    private List<?> journals;

    @ApiModelProperty(value = "评论总数量")
    private Long total_comment_journals_count;

    @ApiModelProperty(value = "当前总数量")
    private Long total_count;

    @ApiModelProperty(value = "评论+操作总数量")
    private Long total_journals_count;

    @ApiModelProperty(value = "操作总数量")
    private Long total_operate_journals_count;



    public static PmsJournalsDataTableVo toPmsJournalsDataTableVo(TableDataInfo tableDataInfo){
        PmsJournalsDataTableVo target = new PmsJournalsDataTableVo();
        target.setJournals(tableDataInfo.getRows());
        target.setTotal_comment_journals_count(tableDataInfo.getTotal());
        target.setTotal_count(tableDataInfo.getTotal());
        target.setTotal_journals_count(tableDataInfo.getTotal());
        target.setTotal_operate_journals_count(0L);
        return target;
    }
}
