toJson method

Map<String, dynamic> toJson()

Converts the BaseDTO to a JSON object.

This method can be used when making HTTP requests to convert the DTO to a format that can be sent in the request.

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> data = <String, dynamic>{};
  data["id"] = id;
  data["isActive"] = isActive;
  data["isDeleted"] = isDeleted;
  data["createdAt"] = createdAt;
  data["updatedAt"] = updatedAt;
  return data;
}