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

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

import java.time.LocalDateTime;

/**
 * @author reghao
 * @date 2025-03-29 22:52:55
 */
public class AlbumCard {
    private Long albumId;
    private String albumName;
    private Integer channelCode;
    private String coverUrl;
    private Integer total;
    private LocalDateTime createdAt;
    private Integer scope;
    private String userId;

    public AlbumCard(PostAlbum postAlbum, String userIdStr) {
        this.albumId = postAlbum.getAlbumId();
        this.albumName = postAlbum.getAlbumName();
        this.channelCode = postAlbum.getChannelCode();
        this.coverUrl = postAlbum.getCoverUrl();
        this.total = postAlbum.getTotal();
        this.createdAt = DateTimeConverter.localDateTime(postAlbum.getCreateAt());
        this.scope = postAlbum.getScope();
        this.userId = userIdStr;
    }
}
