forked from eatvio/eatvio_app
feat(chat): Messages list fill, message model
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
|
||||
class ChatMessageModel extends Equatable {
|
||||
final int id;
|
||||
final String data;
|
||||
final List<dynamic> mediaData;
|
||||
final int authorId;
|
||||
final String updatedAt;
|
||||
|
||||
ChatMessageModel({
|
||||
required this.id,
|
||||
required this.data,
|
||||
required this.mediaData,
|
||||
required this.authorId,
|
||||
required this.updatedAt,
|
||||
});
|
||||
|
||||
ChatMessageModel copyWith({
|
||||
int? id,
|
||||
String? data,
|
||||
List<dynamic>? mediaData,
|
||||
int? authorId,
|
||||
String? updatedAt,
|
||||
}) {
|
||||
return ChatMessageModel(
|
||||
id: id ?? this.id,
|
||||
data: data ?? this.data,
|
||||
mediaData: mediaData ?? this.mediaData,
|
||||
authorId: authorId ?? this.authorId,
|
||||
updatedAt: updatedAt ?? this.updatedAt,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
List<Object?> get props => [id, data, mediaData, authorId, updatedAt];
|
||||
}
|
||||
Reference in New Issue
Block a user