package com.bcxin.api.interfaces.rbacs.requests;

import com.bcxin.api.interfaces.RequestAbstract;
import lombok.Getter;

@Getter
public class ResourceRequest extends RequestAbstract {
    private final String code;
    private final String name;
    private final String data;
    private final String dataType;
    private final String metaId;
    private final String metaConfig;
    private final String metaData;
    private final String parentId;

    public ResourceRequest(String code, String name, String dataType, String data,
                           String parentId,
                           String metaId, String metaConfig, String metaData) {
        this.code = code;
        this.name = name;
        this.data = data;
        this.dataType = dataType;
        this.parentId = parentId;
        this.metaId = metaId;
        this.metaConfig = metaConfig;
        this.metaData = metaData;
    }

    public static ResourceRequest create(String code, String name, String dataType, String data,
                                         String parentId,
                                         String metaId, String metaConfig, String metaData) {
        return new ResourceRequest(code, name, dataType, data, parentId, metaId, metaConfig, metaData);
    }
}
