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

import cn.reghao.jutil.jdk.converter.DateTimeConverter;
import cn.reghao.tnb.file.app.zdisk.model.constant.AlbumType;
import cn.reghao.tnb.file.app.zdisk.model.po.DiskShare;
import lombok.Getter;
import lombok.NoArgsConstructor;

/**
 * @author reghao
 * @date 2025-09-05 17:04:41
 */
@NoArgsConstructor
@Getter
public class DiskShareInfo {
    private long shareId;
    private String albumType;
    private String albumName;
    private String shareAt;
    private int num;

    public DiskShareInfo(DiskShare diskShare, String albumName, int num) {
        this.shareId = diskShare.getShareId();
        this.albumType = AlbumType.getByCode(diskShare.getAlbumType()).getName();
        this.albumName = albumName;
        this.shareAt = DateTimeConverter.format(diskShare.getCreateAt());
        this.num = num;
    }
}
