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

import com.microservices.common.core.web.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @author otto
 */

@Data
@ApiModel("项目聚合搜索对象")
public class ZoneProjectOpenSearchVo extends BaseEntity {
    @ApiModelProperty(value = "项目名称")
    private String name;
    @ApiModelProperty(value = "聚合类型")
    private Long projectTypeId;
    @ApiModelProperty(value = "是否首页展示")
    private String isHomepage;
    @ApiModelProperty(value = "是否公开",hidden = true)
    private Boolean isOpen;

    public ZoneProjectSearchVo toZoneProjectSearchVo(Long zoneId) {
        ZoneProjectSearchVo zoneProjectSearchVo = new ZoneProjectSearchVo();
        zoneProjectSearchVo.setZoneId(zoneId);
        zoneProjectSearchVo.setName(this.name);
        zoneProjectSearchVo.setIsHomepage(this.isHomepage);
        zoneProjectSearchVo.setProjectTypeId(this.projectTypeId);
        return zoneProjectSearchVo;
    }
}
