package com.webchat.domain.vo.request;

import lombok.Data;
import org.apache.commons.lang3.StringUtils;
import org.springframework.util.Assert;

@Data
public class ResourceBehaviorRequestVO {

    private Long resourceId;

    private String resourceType;

    private String behaviorType;

    public void validRequestParam() {
        Assert.isTrue(this != null, "请求参数为空");
        Assert.isTrue(this.resourceId != null, "资源ID为空");
        Assert.isTrue(this.resourceId > 0, "资源不存在");
        Assert.isTrue(StringUtils.isNotBlank(this.resourceType), "资源类型参数为空");
        Assert.isTrue(StringUtils.isNotBlank(this.resourceType), "行为类型参数为空");
    }
}
