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

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

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author otto
 */

@Data
@ApiModel("评论输入对象")
public class PmsJournalsInputVo {

    /** 评论对象ID */
    @NotNull
    @ApiModelProperty(value = "评论对象ID")
    private Long journalized_id;

    /** 评论对象类型 */
    @NotBlank
    @ApiModelProperty(value = "评论对象类型（产品需求：productRequirement, 测试单执行用例：projectTestsheetCases）")
    private String journalized_type;

    /** 父级评论ID */
    @ApiModelProperty(value = "父级评论ID")
    private Long parent_id;

    /** 评论内容 */
    @ApiModelProperty(value = "评论内容")
    private String notes;
    /** 评论内容 */
    @ApiModelProperty(value = "用户标识数组")
    private String[] receivers_login;

    /** 回复评论ID */
    @ApiModelProperty(value = "回复评论ID")
    private Long reply_id;

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


    public PmsJournals toPmsJournals(){
        PmsJournals target = new PmsJournals();
        BeanUtils.copyProperties(this, target);
        return target;
    }
}
