42 lines
985 B
Dart
42 lines
985 B
Dart
class PlanItemDto {
|
|
int? id;
|
|
String? agentName;
|
|
String? summary;
|
|
int? completedSteps;
|
|
int? totalSteps;
|
|
int? planStatus;
|
|
String? createdAt;
|
|
|
|
PlanItemDto({
|
|
this.id,
|
|
this.agentName,
|
|
this.summary,
|
|
this.completedSteps,
|
|
this.totalSteps,
|
|
this.planStatus,
|
|
this.createdAt,
|
|
});
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final map = <String, dynamic>{};
|
|
map["plan_id"] = id;
|
|
map["agent_name"] = agentName;
|
|
map["summary"] = summary;
|
|
map["completed_steps"] = completedSteps;
|
|
map["total_steps"] = totalSteps;
|
|
map["plan_status"] = planStatus;
|
|
map["created_at"] = createdAt;
|
|
return map;
|
|
}
|
|
|
|
PlanItemDto.fromJson(dynamic json) {
|
|
id = json["plan_id"] ?? 0;
|
|
agentName = json["agent_name"] ?? "";
|
|
summary = json["summary"] ?? "";
|
|
completedSteps = json["completed_steps"] ?? 0;
|
|
totalSteps = json["total_steps"] ?? 0;
|
|
planStatus = json["plan_status"] ?? 0;
|
|
createdAt = json["created_at"] ?? "";
|
|
}
|
|
}
|