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

import com.microservices.pms.project.domain.PmsProjectRepository;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;


@Data
@ApiModel("项目-仓库搜索输入对象")
public class PmsProjectRepositorySearchVo
{

    @ApiModelProperty(value = "项目管理项目ID")
    @NotNull
    private Long pmsProjectId;

    @ApiModelProperty(value = "项目关联的仓库id")
    private Long projectRepositoryId;

    @ApiModelProperty(value = "企业标识")
    private String enterpriseIdentifier;

    @ApiModelProperty(value = "是否置顶 0不置顶 1置顶")
    private Integer isTop;

    @ApiModelProperty(value = "项目排序（下拉列表请使用字典：GitLink项目排序规则（gitlink_project_sort_rule））")
    private String sortBy;

    @ApiModelProperty(value = "搜索关键字")
    private String search;

    @ApiModelProperty(value = "页码")
    @NotNull
    private Long page;

    @ApiModelProperty(value = "每页数量")
    @NotNull
    private Long limit;

    @ApiModelProperty(value = "是否导入成功 0未成功 1成功")
    private Boolean actived;

    public PmsProjectRepository toPmsProjectRepository() {
        PmsProjectRepository pmsProjectRepository = new PmsProjectRepository();
        pmsProjectRepository.setPmsProjectId(pmsProjectId);
        pmsProjectRepository.setProjectRepositoryId(projectRepositoryId);
        pmsProjectRepository.setIsTop(isTop);
        return pmsProjectRepository;
    }
}
