package com.microservices.cms.doc.domain.gitlink;

import com.microservices.cms.doc.domain.CmsDoc;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * @author otto
 */
@Data
@ApiModel("Gitlink Issue输入对象")
public class IssueInputDto {

    public IssueInputDto(CmsDoc cmsDoc, String docUrl) {
        this.subject = cmsDoc.getName();
        this.description = String.format("本疑修记录专区文章的仓库路径及评论记录，请勿删除！\n\n%s", docUrl);
    }

    /**
     * 标题
     */
    @ApiModelProperty(value = "标题")
    private String subject;

    /**
     * 描述信息
     */
    @ApiModelProperty(value = "描述信息")
    private String description;

    /**
     * 状态Id
     */
    @ApiModelProperty(value = "状态Id")
    private String statusId = "1";

    /**
     * 优先级Id
     */
    @ApiModelProperty(value = "优先级Id")
    private String priorityId = "2";

    /**
     * 开始时间
     */
    @ApiModelProperty(value = "开始时间")
    private Date startDate;

    /**
     * 结束时间
     */
    @ApiModelProperty(value = "结束时间")
    private Date dueDate;
}
