OrderDTO class
A DTO for the order model.
This class provides a common structure for all order DTOs, including a status, type, customer note, store note, items, customer, invoices, billing address, shipping address, campaigns, note, billing address ID, shipping address ID, is paid, store, and payment method. It also provides methods to convert the DTO to and from a JSON object.
Constructors
-
OrderDTO({String? id, String? createdAt, String? updatedAt, bool? isActive, bool? isDeleted, OrderStatus? status, OrderType? type, String? customerNote, String? storeNote, List<
OrderItemDTO> ? items, UserDTO? customer, List<Invoices> ? invoices, AddressDTO? billingAddress, AddressDTO? shippingAddress, List<CampaignDTO> ? campaigns, String? note, String? billingAddressId, String? shippingAddressId, bool? isPaid, StoreDTO? store, PaymentType? paymentMethod, bool? isTest, String? deletedAt, String? deliveryDate}) -
OrderDTO.fromJson(Map<
String, dynamic> json)
Properties
- billingAddress ↔ AddressDTO?
-
getter/setter pair
- billingAddressId ↔ String?
-
getter/setter pair
-
campaigns
↔ List<
CampaignDTO> ? -
getter/setter pair
- createdAt ↔ String?
-
The time when the DTO was created.
getter/setter pairinherited
- customer ↔ UserDTO?
-
getter/setter pair
- customerNote ↔ String?
-
getter/setter pair
- deletedAt ↔ String?
-
getter/setter pair
- deliveryDate ↔ String?
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- id ↔ String?
-
The ID of the DTO.
getter/setter pairinherited
-
invoices
↔ List<
Invoices> ? -
getter/setter pair
- isActive ↔ bool?
-
Whether the DTO is active.
getter/setter pairinherited
- isDeleted ↔ bool?
-
Whether the DTO has been deleted.
getter/setter pairinherited
- isPaid ↔ bool?
-
getter/setter pair
- isTest ↔ bool?
-
getter/setter pair
-
items
↔ List<
OrderItemDTO> ? -
getter/setter pair
- note ↔ String?
-
getter/setter pair
- paymentMethod ↔ PaymentType?
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shippingAddress ↔ AddressDTO?
-
getter/setter pair
- shippingAddressId ↔ String?
-
getter/setter pair
- status ↔ OrderStatus?
-
getter/setter pair
- store ↔ StoreDTO?
-
getter/setter pair
- storeNote ↔ String?
-
getter/setter pair
- type ↔ OrderType?
-
getter/setter pair
- updatedAt ↔ String?
-
The time when the DTO was last updated.
getter/setter pairinherited
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.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited