models::InsertableSession added for session creation

This commit is contained in:
shockrah 2020-05-19 20:10:39 -07:00
parent ec4f9b5302
commit 87fc6700a4

View File

@ -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,
}