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;

import javax.validation.constraints.NotNull;

/**
 * @author otto
 */

@Data
@ApiModel("资源更新对象")
public class ZoneResourceUpdateVo {

    @ApiModelProperty(value = "资源Id", required = true)
    @NotNull
    private Long id;
    @ApiModelProperty(value = "资源名称")
    private String name;
    @ApiModelProperty(value = "顺序")
    private Integer order;
    @ApiModelProperty(value = "资源简介")
    private String summary;
    @ApiModelProperty(value = "资源领域Id")
    private Long domainId;
    @ApiModelProperty(value = "资源文件Id列表")
    private String fileIds;
    @ApiModelProperty(value = "是否首页展示（0代表不展示 1代表展示）")
    private String isHomepage;

    @ApiModelProperty(value = "审核状态（0：待审核，1：审核通过 2：审核不通过）", hidden = true)
    private String auditStatus = "1";
    @ApiModelProperty(value = "备注", hidden = true)
    private String remark;

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