use crate::render::Render;
use serde::Serialize;
#[derive(Serialize, Clone, Default, Debug)]
pub struct Table {
pub table_name: String,
pub struct_name: String,
pub fields: Vec<Field>,
pub comment: String,
pub index_key: Vec<Vec<String>>,
}
#[derive(Serialize, Clone, Default, Debug)]
pub struct Field {
pub field_name: String,
pub field_type: String,
pub comment: String,
pub is_null: u8,
}
impl Table {
pub fn new(
table_name: String,
struct_name: String,
fields: Vec<Field>,
comment: String,
) -> Table {
Table {
table_name,
struct_name,
fields,
comment,
index_key: vec![],
}
}
}
impl Render for Table {}