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 ZoneResourceDomainUpdateVo {

    @ApiModelProperty(value = "资源领域Id", required = true)
    @NotNull
    private Long id;
    @ApiModelProperty(value = "资源领域名称")
    private String name;
    @ApiModelProperty(value = "顺序")
    private Integer order;

    public ZoneResourceDomain toZoneResourceDomain() {
        ZoneResourceDomain zoneResourceDomain = new ZoneResourceDomain();
        zoneResourceDomain.setId(id);
        zoneResourceDomain.setName(name);
        return zoneResourceDomain;
    }
}
