package cn.lihongjie.coal.netDisk.dto;

import cn.lihongjie.coal.base.dto.OrgCommonDto;

import lombok.Data;

import org.hibernate.annotations.Comment;
import org.hibernate.annotations.Formula;

@Data
public class NetDiskDto extends OrgCommonDto {



    @Comment("条目类型, 文件夹/目录")
    private String entryType;

    @Formula(
            "(select i.name\n"
            + "from t_dictionary d,\n"
            + "     t_dictionary_item i\n"
            + "where d.id = i.dictionary_id\n"
            + "  and d.code = 'netDisk.entryType'\n"
            + "  and i.code = entry_type)")
    private String entryTypeName;




    @Comment("文件/文件夹 大小, 单位 byte")
    private Long size;

    private String sizeHumanReadable;


    @Comment("文件 sha256 值, 文件夹没有")
    private String sha256;


    @Comment("文件 mime 类型, 文件夹没有")
    private String mimeType;
}
