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

import cn.reghao.jutil.jdk.converter.DateTimeConverter;
import cn.reghao.tnb.file.app.model.po.LocalFile;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author reghao
 * @date 2024-10-30 10:24:28
 */
@AllArgsConstructor
@Getter
public class LocalFileInfo {
    private String fileId;
    private String filename;
    private String updateTime;
    private String size;
    private int fileType;
    private String fileTypeStr;

    public LocalFileInfo(LocalFile localFile, String size) {
        this.fileId = localFile.getObjectId();
        this.filename = localFile.getFilename();
        this.updateTime = DateTimeConverter.format(localFile.getUpdateTime());
        this.size = size;
        this.fileType = localFile.getFileType();
        this.fileTypeStr = "";
    }
}
