add: channels/messages database functions
chore: bump contrasted
This commit is contained in:
parent
4cafea66aa
commit
a28072be7f
11 changed files with 358 additions and 6 deletions
|
@ -17,12 +17,12 @@ pub struct Channel {
|
|||
/// The position of this channel in the UI.
|
||||
///
|
||||
/// Top (0) to bottom.
|
||||
pub order: usize,
|
||||
pub position: usize,
|
||||
}
|
||||
|
||||
impl Channel {
|
||||
/// Create a new [`Channel`].
|
||||
pub fn new(community: usize, owner: usize, order: usize) -> Self {
|
||||
pub fn new(community: usize, owner: usize, position: usize) -> Self {
|
||||
Self {
|
||||
id: AlmostSnowflake::new(1234567890)
|
||||
.to_string()
|
||||
|
@ -33,7 +33,7 @@ impl Channel {
|
|||
created: unix_epoch_timestamp() as usize,
|
||||
minimum_role_read: (CommunityPermission::DEFAULT | CommunityPermission::MEMBER).bits(),
|
||||
minimum_role_write: (CommunityPermission::DEFAULT | CommunityPermission::MEMBER).bits(),
|
||||
order,
|
||||
position,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue