package com.liangjian.dataplatform.member.entity.vo.datanodes;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.liangjian.dataplatform.member.constant.DataNodeConstant;
import com.liangjian.dataplatform.member.constant.MetaCoreConstant;
import com.liangjian.dataplatform.member.entity.pojo.DataBaseInfo;

import java.util.Date;

/**
 * @Author: 黄子奇
 * @Date: 2019/8/27 11:07
 * 虚节点，是Schema下的“存储过程” 节点
 */
@JsonIgnoreProperties(ignoreUnknown = true)
public class MetaProcedure extends DataNode {
    private static final long serialVersionUID = 4423021682063821625L;

    private String type;

    private String schema;

    private DataBaseInfo info;

    public MetaProcedure() {
    }

    public MetaProcedure(String id, String prtId, String bizDomain, Boolean isParent, String comment, String remark, Date crtDate, Date lastUpdate, String crtUser, String namespace, String type, String schema, DataBaseInfo info) {
        super(id, prtId, "存储过程", bizDomain, MetaCoreConstant.RELATION_PROCEDURES, isParent, comment, remark, crtDate, lastUpdate, crtUser, namespace);
        this.type = type;
        this.schema = schema;
        this.info = info;
    }

    @Override
    public String getDataKind() {
        return DataNodeConstant.KIND_VIRTUAL_PROCEDURES;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getSchema() {
        return schema;
    }

    public void setSchema(String schema) {
        this.schema = schema;
    }

    public DataBaseInfo getInfo() {
        return info;
    }

    public void setInfo(DataBaseInfo info) {
        this.info = info;
    }
}
