BaseDTO class

A base class for all Data Transfer Objects (DTOs).

This class provides a common structure for all DTOs, including an ID, active status, deleted status, and timestamps. It also provides methods to convert the DTO to and from a JSON object.

All DTOs should inherit from this class and add any additional properties that they need.

Implementers

Constructors

BaseDTO({String? id, bool? isActive, bool? isDeleted, String? createdAt, String? updatedAt})
Creates a new instance of BaseDTO.
BaseDTO.fromJson(Map<String, dynamic> json)
Creates a new instance of BaseDTO from a JSON object.

Properties

createdAt String?
The time when the DTO was created.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
id String?
The ID of the DTO.
getter/setter pair
isActive bool?
Whether the DTO is active.
getter/setter pair
isDeleted bool?
Whether the DTO has been deleted.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
updatedAt String?
The time when the DTO was last updated.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts the BaseDTO to a JSON object.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited