new channel schema which is meant to encompass both text and voice channels
This commit is contained in:
@@ -16,10 +16,16 @@ pub struct User {
|
||||
pub date: u64,
|
||||
}
|
||||
|
||||
// These are to be use specifically for discerning between channel types
|
||||
pub const VOICE_CHANNEL: i32 = 1;
|
||||
pub const TEXT_CHANNEL: i32 = 2;
|
||||
|
||||
#[derive(Serialize, Deserialize, Queryable, Insertable)]
|
||||
#[table_name = "channels" ]
|
||||
pub struct Channel {
|
||||
pub id: i32,
|
||||
pub name: String,
|
||||
pub permissions: i32,
|
||||
pub limit: i32, // <= 0 means there is no limit
|
||||
pub type_: i32, // 1 for voice 2 for text
|
||||
}
|
||||
@@ -3,6 +3,9 @@ table! {
|
||||
id -> Integer,
|
||||
name -> Varchar,
|
||||
permissions -> Integer,
|
||||
limit -> Integer,
|
||||
#[sql_name = "type"]
|
||||
type_ -> Integer,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user