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