-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
115 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import 'package:json_annotation/json_annotation.dart'; | ||
import 'package:psr/model/data/general_model.dart'; | ||
|
||
part 'chat_room_list_model.g.dart'; | ||
|
||
@JsonSerializable() | ||
class ChatRoomListModel extends GeneralModel { | ||
final ChatRoomList? data; | ||
|
||
ChatRoomListModel({required super.code, required super.message, required this.data}); | ||
factory ChatRoomListModel.fromJson(Map<String, dynamic> json) => _$ChatRoomListModelFromJson(json); | ||
} | ||
|
||
@JsonSerializable() | ||
class ChatRoomList { | ||
final List<ChatRoom> noticeLists; | ||
|
||
ChatRoomList({required this.noticeLists}); | ||
factory ChatRoomList.fromJson(Map<String, dynamic> json) => _$ChatRoomListFromJson(json); | ||
} | ||
|
||
@JsonSerializable() | ||
class ChatRoom { | ||
final int chatRoomId; | ||
final String profileImgUrl; | ||
final String nickname; | ||
final String message; | ||
final String date; | ||
final bool isRead; | ||
final int numOfUnread; | ||
|
||
ChatRoom({ | ||
required this.chatRoomId, | ||
required this.profileImgUrl, | ||
required this.nickname, | ||
required this.message, | ||
required this.date, | ||
required this.isRead, | ||
required this.numOfUnread, | ||
}); | ||
|
||
factory ChatRoom.fromJson(Map<String, dynamic> json) => _$ChatRoomFromJson(json); | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters