models::InsertableSession added for session creation
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use crate::schema::{invites, users, channels};
|
||||
use crate::schema::{invites, users, channels, sessions};
|
||||
#[derive(Insertable, Serialize, Deserialize, Queryable, Debug)]
|
||||
#[table_name = "invites"]
|
||||
pub struct Invite {
|
||||
@@ -56,3 +56,10 @@ pub struct InsertableChannel {
|
||||
pub limit: i32, // <= 0 means there is no limit
|
||||
pub type_: i32, // 1 for voice 2 for text
|
||||
}
|
||||
|
||||
#[derive(Insertable)]
|
||||
#[table_name = "sessions"]
|
||||
pub struct InsertableSession {
|
||||
pub secret: String,
|
||||
pub expires: u64,
|
||||
}
|
||||
Reference in New Issue
Block a user