/// Represents an alert event in the IT0 monitoring system.
class AlertEvent {
  final String id;
  final String? ruleId;
  final String? serverId;
  final String severity; // info, warning, critical, fatal
  final String? message;
  final bool acknowledged;
  final DateTime? createdAt;

  const AlertEvent({
    required this.id,
    this.ruleId,
    this.serverId,
    required this.severity,
    this.message,
    required this.acknowledged,
    this.createdAt,
  });

  AlertEvent copyWith({
    String? id,
    String? ruleId,
    String? serverId,
    String? severity,
    String? message,
    bool? acknowledged,
    DateTime? createdAt,
  }) {
    return AlertEvent(
      id: id ?? this.id,
      ruleId: ruleId ?? this.ruleId,
      serverId: serverId ?? this.serverId,
      severity: severity ?? this.severity,
      message: message ?? this.message,
      acknowledged: acknowledged ?? this.acknowledged,
      createdAt: createdAt ?? this.createdAt,
    );
  }
}
