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

import cn.reghao.jutil.jdk.db.BaseObject;
import cn.reghao.tnb.common.auth.UserContext;
import cn.reghao.tnb.content.api.constant.PostScope;
import cn.reghao.tnb.content.api.constant.PostType;
import cn.reghao.tnb.content.app.vod.model.dto.AlbumCreateDto;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * @author reghao
 * @date 2024-10-31 13:55:19
 */
@NoArgsConstructor
@Setter
@Getter
public class PostAlbum extends BaseObject<Integer> {
    private Long albumId;
    private String albumName;
    private String coverUrl;
    private Integer postType;
    private Integer total;
    private Integer scope;
    private Long createBy;

    public PostAlbum(long albumId, AlbumCreateDto albumCreateDto) {
        this.albumId = albumId;
        this.albumName = albumCreateDto.getAlbumName();
        this.coverUrl = "";
        this.postType = PostType.Video.getCode();
        this.total = 0;
        this.scope = PostScope.PRIVATE.getCode();
        this.createBy = UserContext.getUser();
    }
}
