// Version: 1.1.0 | Created: 2026-04-01 | Updated: 2026-04-02
// Immutable room model. Wraps the data the rooms screen needs to display.
// Derived from the Matrix SDK's Room object in the repository layer.

import 'package:freezed_annotation/freezed_annotation.dart';

part 'room_model.freezed.dart';

@freezed
abstract class RoomModel with _$RoomModel {
  const factory RoomModel({
    required String id,
    required String displayName,
    String? avatarUrl,
    String? lastMessagePreview,
    DateTime? lastActivityAt,
    @Default(0) int unreadCount,
    @Default(false) bool isDirect,
  }) = _RoomModel;
}
