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

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

import javax.validation.constraints.NotNull;

/**
 * @author otto
 */

@Data
@ApiModel("项目聚合输入对象")
public class ZoneProjectInputVo {
    @ApiModelProperty(value = "gitlink项目Id", required = true)
    @NotNull
    private Long gitlinkProjectId;
    @ApiModelProperty(value = "聚合项目类型", required = true)
    @NotNull
    private Long projectTypeId;
    @ApiModelProperty(value = "所属专区", required = true)
    @NotNull
    private Long zoneId;

    @ApiModelProperty(value = "排序")
    private Integer sort;

    public ZoneProject toZoneProject() {
        ZoneProject zoneProject = new ZoneProject();
        BeanUtils.copyProperties(this, zoneProject);
        return zoneProject;
    }

}
