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 10:58
 * 虚节点，是反向工程获取落地库中的schema节点
 */
@JsonIgnoreProperties(ignoreUnknown = true)
public class MetaSchema extends DataNode {

    private static final long serialVersionUID = -4930049770130536337L;

    private String type;

    private String schema;

    private DataBaseInfo info;

    public MetaSchema() {
    }

    public MetaSchema(String id, String prtId, String name, String bizDomain, String nodeType, Boolean isParent, String comment, String remark, Date crtDate, Date lastUpdate, String crtUser, String namespace, String type, String schema, DataBaseInfo info) {
        super(id, prtId, name, bizDomain, MetaCoreConstant.RELATION_SCHEMA, isParent, comment, remark, crtDate, lastUpdate, crtUser, namespace);
        this.type = type;
        this.schema = schema;
        this.info = info;
    }

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

    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;
    }
}
