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

import com.microservices.common.core.utils.bean.BeanUtils;
import com.microservices.zone.resource.domain.ZoneResource;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @author otto
 */
@Data
@ApiModel("资源搜索对象")
public class ZoneResourceOpenSearchVo {
    @ApiModelProperty(value = "资源名称")
    private String name;

    /**
     * 资源领域Id
     */
    @ApiModelProperty(value = "资源领域Id")
    private Long domainId;


    /**
     * 查找的资源类型Id
     */
    @ApiModelProperty(value = "查找的资源类型Id")
    private Long searchTypeId;

    /**
     * 是否首页展示（0代表不展示 1代表展示）
     */
    @ApiModelProperty(value = "是否首页展示（0代表不展示 1代表展示）")
    private String isHomepage;

    public ZoneResource toZoneResource() {
        ZoneResource target = new ZoneResource();
        BeanUtils.copyProperties(this, target);
        return target;
    }
}
