mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2025-06-20 08:25:16 +00:00
Create new groups
This commit is contained in:
24
src/data/group_member.rs
Normal file
24
src/data/group_member.rs
Normal file
@ -0,0 +1,24 @@
|
||||
//! # Group membership information
|
||||
//!
|
||||
//! @author Pierre Hubert
|
||||
|
||||
use crate::data::user::UserID;
|
||||
use crate::data::group_id::GroupID;
|
||||
|
||||
pub enum GroupMembershipLevel {
|
||||
ADMINISTRATOR = 0,
|
||||
MODERATOR = 1,
|
||||
MEMBER = 2,
|
||||
INVITED = 3,
|
||||
PENDING = 4, //When the group membership has not been approved yet
|
||||
VISITOR = 5, //Simple visit
|
||||
}
|
||||
|
||||
pub struct GroupMember {
|
||||
pub id: u64,
|
||||
pub user_id: UserID,
|
||||
pub group_id: GroupID,
|
||||
pub time_create: u64,
|
||||
pub level: GroupMembershipLevel,
|
||||
pub following: bool
|
||||
}
|
@ -14,4 +14,6 @@ pub mod new_conversation_message;
|
||||
pub mod unread_conversation;
|
||||
pub mod group_id;
|
||||
pub mod group;
|
||||
pub mod new_group;
|
||||
pub mod group_member;
|
||||
pub mod global_search_result;
|
10
src/data/new_group.rs
Normal file
10
src/data/new_group.rs
Normal file
@ -0,0 +1,10 @@
|
||||
//! # New group information
|
||||
//!
|
||||
//! @author Pierre Hubert
|
||||
|
||||
use crate::data::user::UserID;
|
||||
|
||||
pub struct NewGroup {
|
||||
pub name: String,
|
||||
pub owner_id: UserID,
|
||||
}
|
Reference in New Issue
Block a user