package com.lion.lionwebsite.Domain;



import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.util.ArrayList;
import java.util.Map;

@Data
public class Gallery {
    public static byte VIEW = 0;
    public static byte SOURCE = 1;
    public static byte PREVIEW = 2;
    public static byte ALL = 3;

    @JsonProperty("name")
    private String name;                                    //本子名字

    @JsonProperty("gid")
    private int gid;                                     //gid

    @JsonProperty("link")
    private String link;                                    //本子链接

    @JsonProperty("language")
    private String language;                                //本子语言

    @JsonProperty("pages")
    private int pages;                                      //本子页数

    @JsonProperty("status")
    private String status;                                  //本子当前状态

    @JsonIgnore
    private long fileSize;                                  //文件大小

    @JsonProperty("fileSize")
    private String displayFileSize;                         //展示文件大小

    @JsonProperty("createTime")
    private Long createTime;                                //创建时间

    @JsonProperty("resolution")
    private String resolution;                              //分辨率

    @JsonProperty("proceeding")
    private int proceeding;                                 //进度

    @JsonProperty("downloader")
    private int downloader;                              //下载人

    @JsonProperty("collector")
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private String collector;                               //收藏人

    @JsonProperty("isCollect")                              //是否收藏
    @JsonInclude(JsonInclude.Include.NON_DEFAULT)
    private boolean isCollect;

    @JsonProperty("tags")
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private ArrayList<Integer> tags;                          //标签

    @JsonProperty("availableResolution")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Map<String, String> availableResolution;        //可选分辨率

    @JsonProperty("mode")
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private byte mode;                                    //0 仅查看 1 仅下载源文件 2 仅存储预览图 3 全部

    @JsonProperty("thumb_link")
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private String thumb_link;
}
