new schema to contain basic channel information
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use crate::schema::{invites, users};
|
||||
use crate::schema::{invites, users, channels};
|
||||
#[derive(Insertable, Serialize, Deserialize, Queryable, Debug)]
|
||||
#[table_name = "invites"]
|
||||
pub struct Invite {
|
||||
@@ -14,4 +14,12 @@ pub struct User {
|
||||
pub username: String,
|
||||
pub key: String,
|
||||
pub date: u64,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Queryable, Insertable)]
|
||||
#[table_name = "channels" ]
|
||||
pub struct Channel {
|
||||
pub id: i32,
|
||||
pub name: String,
|
||||
pub permissions: i32,
|
||||
}
|
||||
@@ -1,3 +1,11 @@
|
||||
table! {
|
||||
channels (id) {
|
||||
id -> Integer,
|
||||
name -> Varchar,
|
||||
permissions -> Integer,
|
||||
}
|
||||
}
|
||||
|
||||
table! {
|
||||
invites (id) {
|
||||
id -> Unsigned<Bigint>,
|
||||
@@ -16,6 +24,7 @@ table! {
|
||||
}
|
||||
|
||||
allow_tables_to_appear_in_same_query!(
|
||||
channels,
|
||||
invites,
|
||||
users,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user