mirror of https://github.com/TaKO8Ki/gobang
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
858 B
Rust
40 lines
858 B
Rust
mod databasetree;
|
|
mod databasetreeitems;
|
|
mod error;
|
|
mod item;
|
|
mod tree_iter;
|
|
mod treeitems_iter;
|
|
|
|
pub use crate::{
|
|
databasetree::DatabaseTree,
|
|
databasetree::MoveSelection,
|
|
item::{DatabaseTreeItem, TreeItemInfo},
|
|
};
|
|
|
|
#[derive(Clone)]
|
|
pub struct Database {
|
|
pub name: String,
|
|
pub tables: Vec<Table>,
|
|
}
|
|
|
|
impl Database {
|
|
pub fn new(database: String, tables: Vec<Table>) -> Self {
|
|
Self {
|
|
name: database,
|
|
tables,
|
|
}
|
|
}
|
|
}
|
|
|
|
#[derive(sqlx::FromRow, Debug, Clone, PartialEq)]
|
|
pub struct Table {
|
|
#[sqlx(rename = "Name")]
|
|
pub name: String,
|
|
#[sqlx(rename = "Create_time")]
|
|
pub create_time: Option<chrono::DateTime<chrono::Utc>>,
|
|
#[sqlx(rename = "Update_time")]
|
|
pub update_time: Option<chrono::DateTime<chrono::Utc>>,
|
|
#[sqlx(rename = "Engine")]
|
|
pub engine: Option<String>,
|
|
}
|