1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2025-06-19 00:05:16 +00:00

Show groups posts

This commit is contained in:
2019-06-10 09:47:02 +02:00
parent d62d23bd44
commit ee864d3d98
7 changed files with 186 additions and 7 deletions

53
lib/models/group.dart Normal file
View File

@ -0,0 +1,53 @@
import 'package:meta/meta.dart';
/// Group information
///
/// @author Pierre HUBERT
enum GroupMembershipLevel {
ADMINISTRATOR,
MODERATOR,
MEMBER,
INVITED,
PENDING,
VISITOR
}
enum GroupVisibilityLevel { OPEN, PRIVATE, SECRETE }
enum GroupRegistrationLevel { OPEN, MODERATED, CLOSED }
enum GroupPostCreationLevel { MODERATORS, MEMBERS }
class Group {
final int id;
final String name;
final int numberMembers;
final GroupMembershipLevel membershipLevel;
final GroupVisibilityLevel visibilityLevel;
final GroupRegistrationLevel registrationLevel;
final GroupPostCreationLevel postCreationLevel;
final String virtualDirectory;
final bool following;
Group({
@required this.id,
@required this.name,
@required this.numberMembers,
@required this.membershipLevel,
@required this.visibilityLevel,
@required this.registrationLevel,
@required this.postCreationLevel,
@required this.virtualDirectory,
@required this.following,
}) : assert(id != null),
assert(name != null),
assert(numberMembers != null),
assert(membershipLevel != null),
assert(visibilityLevel != null),
assert(registrationLevel != null),
assert(postCreationLevel != null),
assert(following != null);
get displayName => this.name;
}