오대리ㅣㅣㅣㅣ

This commit is contained in:
송원형
2026-04-07 16:17:03 +09:00
commit 5bb54fdefe
63 changed files with 7897 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
class MessageModel {
MessageModel({
required this.id,
required this.roomId,
required this.senderId,
required this.body,
required this.createdAt,
this.kind = 'text',
});
final String id;
final String roomId;
final String senderId;
final String body;
final String createdAt;
final String kind;
factory MessageModel.fromJson(Map<String, dynamic> j) {
return MessageModel(
id: j['id'] as String,
roomId: j['roomId'] as String,
senderId: j['senderId'] as String,
body: j['body'] as String,
createdAt: j['createdAt'] as String,
kind: j['kind'] as String? ?? 'text',
);
}
factory MessageModel.fromWs(Map<String, dynamic> j) {
return MessageModel(
id: j['id'] as String,
roomId: j['roomId'] as String,
senderId: j['senderId'] as String,
body: j['body'] as String,
createdAt: j['createdAt'] as String,
kind: j['kind'] as String? ?? 'text',
);
}
}