import 'package:freezed_annotation/freezed_annotation.dart';

part 'message.freezed.dart';
// part 'message.g.dart';

enum MessageStatus { sending, delivered, read, error }

@freezed
class Message with _$Message {
  const factory Message({
    required String id,
    required String chatId,
    required String senderId,
    required String content,
    required String messageType,
    required int sequenceId,
    DateTime? createdAt,
    DateTime? updatedAt,
    @Default(MessageStatus.delivered) MessageStatus status,
    Map<String, dynamic>? media,
  }) = _Message;
}
