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 ZoneResourceDomainSearchVo {
    @ApiModelProperty(value = "资源领域名称")
    private String name;
    @ApiModelProperty(value = "所属专区", required = true)
    @NotNull
    private Long zoneId;
    @ApiModelProperty(value = "领域分类：SKILL/MODEL/DATASET，NULL或者不传代表所有资源领域")
    private String domainCategory;

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