package cn.reghao.tnb.file.app.zdisk.model.po;

import cn.reghao.jutil.jdk.web.db.BaseObject;
import cn.reghao.tnb.common.auth.UserContext;
import cn.reghao.tnb.file.app.zdisk.model.dto.AlbumCreate;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * @author reghao
 * @date 2025-09-01 14:40:36
 */
@NoArgsConstructor
@Setter
@Getter
public class DiskAlbum extends BaseObject<Integer> {
    private long albumId;
    private String albumName;
    private Integer fileType;
    private String coverFileId;
    private Integer num;
    private Long createAt;
    private Long createBy;

    public DiskAlbum(long albumId, AlbumCreate albumCreate) {
        this.albumId = albumId;
        this.albumName = albumCreate.getAlbumName();
        this.fileType = albumCreate.getFileType();
        this.coverFileId = "";
        this.num = 0;
        this.createAt = System.currentTimeMillis();
        this.createBy = UserContext.getUserId();
    }
}
