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 {
|
2022-03-10 18:39:57 +00:00
|
|
|
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;
|
2022-03-10 18:39:57 +00:00
|
|
|
List<Conversation>? conversations;
|
|
|
|
bool isForezGroup;
|
2020-04-15 16:06:20 +00:00
|
|
|
|
|
|
|
AdvancedGroupInfo({
|
2022-03-10 18:39:57 +00:00
|
|
|
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,
|
2021-04-22 13:15:40 +00:00
|
|
|
}) : assert(isForezGroup != null),
|
|
|
|
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
|
|
|
|
|
|
|
get hasURL => url != null && url.isNotEmpty && url != "null";
|
|
|
|
|
|
|
|
get hasDescription =>
|
|
|
|
description != null && description.isNotEmpty && description != "null";
|
2020-04-15 16:06:20 +00:00
|
|
|
}
|