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

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

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * @author OTTO
 */
@Data
@ApiModel("专项项目关联关系输入对象")
public class ZoneSpecialProjectRelevancyInputVo {
    @ApiModelProperty(value = "专项项目id", required = true)
    @NotNull
    private Long specialProjectId;
    @ApiModelProperty(value = "专项项目关联类型", required = true)
    @NotNull
    private String type;
    @ApiModelProperty(value = "专项项目关联关系的作者")
    @Size(max = 100, message = "专项项目关联关系的作者长度不能超过100个字符")
    private String author;
    @ApiModelProperty(value = "专项项目关联关系的单位")
    @Size(max = 300, message = "专项项目关联关系的单位长度不能超过300个字符")
    private String company;
    @ApiModelProperty(value = "专项项目关联对象id", required = true)
    @NotNull
    private Long relevancyId;


    public ZoneSpecialProjectRelevancy toZoneSpecialProjectRelevancySearchVo() {
        ZoneSpecialProjectRelevancy target = new ZoneSpecialProjectRelevancy();
        BeanUtils.copyProperties(this, target);
        return target;
    }
}