1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-12-01 17:26:28 +00:00
comunicmobile/lib/models/group.dart

54 lines
1.3 KiB
Dart
Raw Normal View History

2019-06-10 07:47:02 +00:00
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;
}