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

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 ZoneProjectUpdateVo {
    @ApiModelProperty(value = "聚合项目类型")
    @NotNull
    private Long projectTypeId;

    @ApiModelProperty(value = "顺序")
    private Integer order;

    public ZoneProject toZoneProject(Long id) {
        ZoneProject zoneProject = new ZoneProject();
        zoneProject.setId(id);
        zoneProject.setProjectTypeId(projectTypeId);
        return zoneProject;
    }
}
