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

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

/**
 * @author otto
 */

@Data
@ApiModel("专区详情搜索对象")
public class ZoneDetailSearchVo extends BaseEntity {
    @ApiModelProperty(value = "特色专区名称")
    private String name;
    @ApiModelProperty(value = "所属组织Id")
    private Long deptId;
    @ApiModelProperty(value = "主标题")
    private String mainTitle;
    @ApiModelProperty(value = "专区是否发布（0:未发布，1：已发布）")
    private Integer isPublish;

    public ZoneDetail toZoneDetail() {
        ZoneDetail zoneDetail = new ZoneDetail();
        zoneDetail.setName(name);
        zoneDetail.setDeptId(deptId);
        zoneDetail.setMainTitle(mainTitle);
        zoneDetail.setIsPublish(isPublish);
        return zoneDetail;
    }
}
