add most models needed for invites
This commit is contained in:
parent
f741a6790d
commit
0df2d8f78b
7 changed files with 61 additions and 4 deletions
21
lib/models/invited_room.dart
Normal file
21
lib/models/invited_room.dart
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import "package:fast_immutable_collections/fast_immutable_collections.dart";
|
||||
import "package:freezed_annotation/freezed_annotation.dart";
|
||||
import "package:nexus/models/epoch_date_time_converter.dart";
|
||||
import "package:nexus/models/event.dart";
|
||||
|
||||
part "invited_room.freezed.dart";
|
||||
part "invited_room.g.dart";
|
||||
|
||||
@Freezed(toJson: false, fromJson: false)
|
||||
@JsonSerializable()
|
||||
class const InvitedRoom({
|
||||
required final String roomId,
|
||||
@EpochDateTimeConverter() required final DateTime createdAt,
|
||||
// TODO: This is DBEvent, should be event.Event
|
||||
required final IList<Event> inviteState,
|
||||
}) with _$InvitedRoom {
|
||||
Map<String, Object?> toJson() => _$InvitedRoomToJson(this);
|
||||
|
||||
factory InvitedRoom.fromJson(Map<String, Object?> json) =>
|
||||
_$InvitedRoomFromJson(json);
|
||||
}
|
||||
Loading…
Reference in a new issue