Assign.fromJson constructor
Implementation
factory Assign.fromJson(Map<String, dynamic> json, String id) {
final Timestamp? createdAt = json['createdAt'];
final Timestamp? updatedAt = json['updatedAt'];
return Assign(
id: id,
uid: json['uid'],
taskId: json['taskId'],
status: json['status'],
createdAt: createdAt == null ? DateTime.now() : createdAt.toDate(),
updatedAt: updatedAt == null ? DateTime.now() : updatedAt.toDate(),
);
}