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 MetaView extends DataNode {
    private static final long serialVersionUID = 4423021682063821625L;

    private String type;

    private String schema;

    private DataBaseInfo info;

    public MetaView() {
    }

    public MetaView(String id, String prtId, String bizDomain, Boolean isParent, String comment, String remark, Date crtDate, Date lastUpdate, String crtUser, String namespace, String type, String schmea, DataBaseInfo info) {
        super(id, prtId, "视图", bizDomain, MetaCoreConstant.RELATION_VIEWS, isParent, comment, remark, crtDate, lastUpdate, crtUser,namespace);
        this.type = type;
        this.schema = schmea;
        this.info = info;
    }

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

    public String getType() {
        return type;
    }

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

    public String getSchema() {
        return schema;
    }

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

    public DataBaseInfo getInfo() {
        return info;
    }

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