feat(core): implement channel invite model

closes #268
This commit is contained in:
Paul Makles
2023-08-01 15:53:43 +01:00
parent c48109ca66
commit a516c7adcf
10 changed files with 293 additions and 3 deletions

View File

@@ -0,0 +1,27 @@
auto_derived!(
/// Invite
pub enum Invite {
/// Invite to a specific server channel
Server {
/// Invite code
#[cfg_attr(feature = "serde", serde(rename = "_id"))]
code: String,
/// Id of the server this invite points to
server: String,
/// Id of user who created this invite
creator: String,
/// Id of the server channel this invite points to
channel: String,
},
/// Invite to a group channel
Group {
/// Invite code
#[cfg_attr(feature = "serde", serde(rename = "_id"))]
code: String,
/// Id of user who created this invite
creator: String,
/// Id of the group channel this invite points to
channel: String,
},
}
);

View File

@@ -1,4 +1,5 @@
mod bots;
mod channel_invites;
mod channel_webhooks;
mod channels;
mod files;
@@ -7,6 +8,7 @@ mod servers;
mod users;
pub use bots::*;
pub use channel_invites::*;
pub use channel_webhooks::*;
pub use channels::*;
pub use files::*;