import 'package:freezed_annotation/freezed_annotation.dart';
import 'user.dart';
import 'message.dart';

part 'chat.freezed.dart';

@freezed
class Chat with _$Chat {
  const factory Chat({
    required String id,
    required String type,
    required String title,
    String? avatarUrl,
    List<User>? participants,
    @Default(null) Message? lastMessage,
    DateTime? lastMessageTime,
    @Default(0) int unreadCount,
    @Default(false) bool isMuted,
    @Default(false) bool isPinned,
  }) = _Chat;
}
