package com.microservices.pms.document.domain.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.microservices.system.api.domain.SimpleSysUser;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * 项目管理-文档库对象 pms_document
 * 
 * @author wanjia
 * @date 2024-01-08
 */
@Data
@ApiModel("文档对象")
public class PmsDocumentVo
{
    @ApiModelProperty(value = "文档id")
    private Long id;

    /** 文档名称 */
    @ApiModelProperty(value = "文档名称")
    private String name;

    /** 文件类型 1-文档目录 2-文档 3-附件 4-wiki库 */
    @ApiModelProperty(value = "文件类型 1-文档目录 2-文档 3-附件 4-wiki库")
    private Integer docType;

    /** 父级id */
    @ApiModelProperty(value = "父级id")
    private Long parentId;

    /** 项目ID */
    @ApiModelProperty(value = "项目ID")
    private Long pmsProjectId;

    /** 企业ID */
    @ApiModelProperty(value = "企业ID")
    private Long pmsEnterpriseId;

    /** wiki库归属的gitlink仓库ID */
    @ApiModelProperty(value = "wiki库归属的gitlink仓库ID")
    private Long wikiGitlinkRepoId;

    /** 附件标识 */
    @ApiModelProperty(value = "附件标识")
    private String attachmentIdentifier;

    /** 是否置顶（0否，1是） */
    @ApiModelProperty(value = "是否置顶")
    private Integer isTop;

    /** 权限 1-私有 2-全员读 3-全员读写 */
    @ApiModelProperty(value = "权限 1-私有 2-全员读 3-全员读写")
    private Integer permission;

    @ApiModelProperty(value = "文档创建者")
    private SimpleSysUser creator;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    @ApiModelProperty(value = "wiki库简要信息")
    @JsonInclude(JsonInclude.Include.NON_NULL) //为空时隐藏
    private SimpleWikiRepositoryVo wikiRepositorySimpleInfo;

    @ApiModelProperty(value = "是否被收藏")
    private Boolean isFavour;
}
