mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2025-01-05 18:38:51 +00:00
24 lines
529 B
Rust
24 lines
529 B
Rust
|
//! # 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
|
||
|
}
|