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


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

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;

@Data
@ApiModel("项目输入对象")
public class PmsProjectInputVo {

    @ApiModelProperty(value = "项目名称")
    @NotNull
    @Size(max = 50)
    private String projectName;

    @ApiModelProperty(value = "关联仓库ids")
    private String projectRepositoryIds;

    @ApiModelProperty(value = "负责人id")
    private Long projectAssigneeId;

    @ApiModelProperty(value = "成员ids")
    private String pmsProjectMemberIds;

    @ApiModelProperty(value = "项目简介")
    @Size(max = 200)
    private String projectDescription;

    @ApiModelProperty(value = "企业id")
    @NotNull
    private Long pmsEnterpriseId;

    @ApiModelProperty(value = "产品id")
    private Long pmsProductId;

    @ApiModelProperty(value = "项目开始时间")
    private Date startTime;

    @ApiModelProperty(value = "项目结束时间")
    private Date endTime;

    public PmsProject toPmsProject() {
        PmsProject pmsProject = new PmsProject();
        BeanUtils.copyProperties(this, pmsProject);
        return pmsProject;
    }

}
