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

import com.microservices.common.core.utils.bean.BeanUtils;
import com.microservices.zone.specialProject.domain.ZoneSpecialProjectType;
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 ZoneSpecialProjectTypeUpdateVo {

    @ApiModelProperty(value = "专项项目分类Id", required = true)
    @NotNull
    private Long id;
    @Size(max = 100, message = "专项项目分类名称长度不能超过100个字符")
    @ApiModelProperty(value = "专项项目分类名称")
    private String name;
    @ApiModelProperty(value = "顺序")
    private Integer order;


    public ZoneSpecialProjectType toZoneSpecialProjectType() {
        ZoneSpecialProjectType target = new ZoneSpecialProjectType();
        BeanUtils.copyProperties(this, target);
        return target;
    }
}
