/// Represents an operations task in the IT0 system.
class Task {
  final String id;
  final String title;
  final String? description;
  final String status;
  final String? priority;
  final String? serverId;
  final String? serverName;
  final String? assignedTo;
  final DateTime? createdAt;
  final DateTime? updatedAt;
  final DateTime? completedAt;

  const Task({
    required this.id,
    required this.title,
    this.description,
    required this.status,
    this.priority,
    this.serverId,
    this.serverName,
    this.assignedTo,
    this.createdAt,
    this.updatedAt,
    this.completedAt,
  });

  Task copyWith({
    String? id,
    String? title,
    String? description,
    String? status,
    String? priority,
    String? serverId,
    String? serverName,
    String? assignedTo,
    DateTime? createdAt,
    DateTime? updatedAt,
    DateTime? completedAt,
  }) {
    return Task(
      id: id ?? this.id,
      title: title ?? this.title,
      description: description ?? this.description,
      status: status ?? this.status,
      priority: priority ?? this.priority,
      serverId: serverId ?? this.serverId,
      serverName: serverName ?? this.serverName,
      assignedTo: assignedTo ?? this.assignedTo,
      createdAt: createdAt ?? this.createdAt,
      updatedAt: updatedAt ?? this.updatedAt,
      completedAt: completedAt ?? this.completedAt,
    );
  }
}
