import '../utils/app_time.dart';

class TaskAssignment {
  TaskAssignment({
    required this.taskId,
    required this.userId,
    required this.createdAt,
  });

  final String taskId;
  final String userId;
  final DateTime createdAt;

  factory TaskAssignment.fromMap(Map<String, dynamic> map) {
    return TaskAssignment(
      taskId: map['task_id'] as String,
      userId: map['user_id'] as String,
      createdAt: AppTime.parse(map['created_at'] as String),
    );
  }
}
