mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-11-26 06:49:22 +00:00
34 lines
808 B
Dart
34 lines
808 B
Dart
import 'package:meta/meta.dart';
|
|
|
|
/// Conversation model
|
|
///
|
|
/// @author Pierre HUBERT
|
|
|
|
class Conversation {
|
|
final int id;
|
|
final int ownerID;
|
|
final int lastActive;
|
|
final String name;
|
|
final bool following;
|
|
final bool sawLastMessage;
|
|
final List<int> members;
|
|
|
|
const Conversation({
|
|
@required this.id,
|
|
@required this.ownerID,
|
|
@required this.lastActive,
|
|
@required this.name,
|
|
@required this.following,
|
|
@required this.sawLastMessage,
|
|
@required this.members,
|
|
}) : assert(id != null),
|
|
assert(ownerID != null),
|
|
assert(lastActive != null),
|
|
assert(following != null),
|
|
assert(sawLastMessage != null),
|
|
assert(members != null);
|
|
|
|
/// Check out whether a conversation has a fixed name or not
|
|
bool get has_name => this.name != null;
|
|
}
|