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

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

import javax.validation.constraints.NotNull;

/**
 * @author otto
 */

@Data
@ApiModel("资源类别输入对象")
public class ZoneResourceTypeInputVo {
    @ApiModelProperty(value = "资源类别名称", required = true)
    @NotNull
    private String name;
    @ApiModelProperty(value = "所属专区", required = true)
    @NotNull
    private Long zoneId;
    @ApiModelProperty(value = "包含文件内容类型列表", required = true)
    @NotNull
    private String fileTypeList;

    public ZoneResourceType toZoneResourceType() {
        ZoneResourceType target = new ZoneResourceType();
        BeanUtils.copyProperties(this, target);
        return target;
    }
}
