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

import com.microservices.common.core.utils.bean.BeanUtils;
import com.microservices.pms.document.domain.PmsDocument;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Size;

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

    /** 文档名称 */
    @ApiModelProperty(value = "文档名称")
    @Size(min = 1, max = 50)
    private String name;

    /** 文档内容 */
    @ApiModelProperty(value = "文档内容")
    private String content;

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

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

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

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

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

    public PmsDocument toPmsDocument() {
        PmsDocument pmsDocument = new PmsDocument();
        BeanUtils.copyProperties(this, pmsDocument);
        return pmsDocument;
    }
}
