package cn.reghao.tnb.content.app.vod.model.vo;

import cn.reghao.jutil.jdk.converter.DateTimeConverter;
import cn.reghao.tnb.content.api.constant.PostScope;
import cn.reghao.tnb.content.app.vod.model.po.PostAlbum;

/**
 * @author reghao
 * @date 2024-11-04 15:33:54
 */
public class AlbumInfo {
    private long albumId;
    private String albumName;
    private String coverUrl;
    private int total;
    private int scope;
    private String scopeStr;
    private long createBy;
    private String createAt;

    public AlbumInfo(PostAlbum postAlbum) {
        this.albumId = postAlbum.getAlbumId();
        this.albumName = postAlbum.getAlbumName();
        this.coverUrl = postAlbum.getCoverUrl();
        this.total = postAlbum.getTotal();
        this.scope = postAlbum.getScope();
        this.scopeStr = PostScope.getByCode(postAlbum.getScope()).getDesc();
        this.createBy = postAlbum.getCreateBy();
        this.createAt = DateTimeConverter.format(postAlbum.getCreateTime());
    }
}
