package com.cyksj.model.views;

import com.baomidou.mybatisplus.annotation.TableField;
import com.cyksj.common.util.TimeUtil;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;

/**
 * @author zwhui
 * @date 2023/10/12 18:02
 */
@Getter
@Setter
public class InformationListView {

    private Long id;
    /**
     * 文章标题
     */
    private String title;

    /**
     * 副标题
     */
    private String subTitle;

    private String logo;

    private Boolean isBlackFont;

    /**
     * 缩略图
     */
    private String thumbnail;

    /**
     * 内容
     */
    private String content;

    private Date createdTime;

    @TableField(exist = false)
    private String differenceTime;

    public void setCreatedTime(Date createdTime) {
        this.createdTime = createdTime;
        this.differenceTime = TimeUtil.getDifferenceTime(createdTime);
    }
}
