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