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 ZoneSpecialProjectRelevancyUpdateVo {
    @ApiModelProperty(value = "专项项目关联关系的id", required = true)
    @NotNull
    private Long id;
    @ApiModelProperty(value = "专项项目关联关系的作者")
    @Size(max = 100, message = "专项项目关联关系的作者长度不能超过100个字符")
    private String author;
    @ApiModelProperty(value = "专项项目关联关系的单位")
    @Size(max = 300, message = "专项项目关联关系的单位长度不能超过300个字符")
    private String company;
    @ApiModelProperty(value = "专项项目关联对象id")
    private Long relevancyId;
    @ApiModelProperty(value = "顺序")
    private Integer order;


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