1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-10-23 15:03:22 +00:00
comunicmobile/lib/models/advanced_group_info.dart

59 lines
1.7 KiB
Dart
Raw Normal View History

2020-04-15 17:23:08 +00:00
import 'package:comunic/enums/likes_type.dart';
2021-04-06 15:04:55 +00:00
import 'package:comunic/models/conversation.dart';
2020-04-15 17:23:08 +00:00
import 'package:comunic/models/like_element.dart';
2020-04-15 16:06:20 +00:00
import 'group.dart';
/// Advanced group information
///
/// @author Pierre Hubert
2020-04-15 17:23:08 +00:00
class AdvancedGroupInfo extends Group implements LikeElement {
bool? isMembersListPublic;
final int? timeCreate;
2020-05-01 18:30:26 +00:00
String description;
2020-05-01 18:19:22 +00:00
String url;
2020-04-15 17:23:08 +00:00
int likes;
bool userLike;
List<Conversation>? conversations;
bool isForezGroup;
2020-04-15 16:06:20 +00:00
AdvancedGroupInfo({
required int id,
required String name,
required String iconURL,
required int numberMembers,
required GroupMembershipLevel membershipLevel,
required GroupVisibilityLevel visibilityLevel,
required GroupRegistrationLevel registrationLevel,
required GroupPostCreationLevel postCreationLevel,
required String virtualDirectory,
required bool following,
required this.isMembersListPublic,
required this.timeCreate,
required this.description,
required this.url,
required this.likes,
required this.userLike,
required this.conversations,
required this.isForezGroup,
2022-03-11 15:27:01 +00:00
}) : super(
2020-04-15 16:06:20 +00:00
id: id,
name: name,
iconURL: iconURL,
numberMembers: numberMembers,
membershipLevel: membershipLevel,
visibilityLevel: visibilityLevel,
registrationLevel: registrationLevel,
postCreationLevel: postCreationLevel,
virtualDirectory: virtualDirectory,
following: following);
2020-04-15 17:23:08 +00:00
@override
LikesType likeType = LikesType.GROUP;
2021-03-16 18:01:50 +00:00
2022-03-11 15:27:01 +00:00
get hasURL => url.isNotEmpty && url != "null";
2021-03-16 18:01:50 +00:00
2022-03-11 15:27:01 +00:00
get hasDescription => description.isNotEmpty && description != "null";
2020-04-15 16:06:20 +00:00
}