package com.cm.common.plugin.pojo.vos.database.table;

import com.cm.common.annotation.CheckListAnnotation;
import com.cm.common.annotation.CheckNullAnnotation;

import java.util.List;

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: TableVO
 * @Description: TODO
 * @Author: WangGeng
 * @Date: 2019/11/14 11:10
 * @Version: 1.0
 **/
public class TableVO {

    @CheckNullAnnotation(name = "表名")
    private String tableName;
    @CheckListAnnotation(name = "列名")
    private List<TableColumnVO> tableColumns;

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    public List<TableColumnVO> getTableColumns() {
        return tableColumns;
    }

    public void setTableColumns(List<TableColumnVO> tableColumns) {
        this.tableColumns = tableColumns;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("{");
        sb.append("\"tableName\":\"")
                .append(tableName).append('\"');
        sb.append(",\"tableColumns\":")
                .append(tableColumns);
        sb.append('}');
        return sb.toString();
    }
}
