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

import com.microservices.zone.resource.domain.ZoneResourceDomain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;

/**
 * @author otto
 */

@Data
@ApiModel("资源领域输入对象")
public class ZoneResourceDomainInputVo {
    @ApiModelProperty(value = "资源领域名称", required = true)
    @NotNull
    private String name;
    @ApiModelProperty(value = "所属专区", required = true)
    @NotNull
    private Long zoneId;

    public ZoneResourceDomain toZoneResourceDomain() {
        ZoneResourceDomain zoneResourceDomain = new ZoneResourceDomain();
        zoneResourceDomain.setZoneId(zoneId);
        zoneResourceDomain.setName(name);
        return zoneResourceDomain;
    }
}
