CampaignDTO class
A DTO for the campaign model.
This class provides a common structure for all campaign DTOs, including a title, description, discount start date, discount end date, type, price type, product count, free product count, limit, used, show on main, photo, products, and tags. It also provides methods to convert the DTO to and from a JSON object.
Constructors
-
CampaignDTO({String? id, String? createdAt, String? updatedAt, bool? isActive, bool? isDeleted, String? title, String? description, String? discountStartDate, String? discountEndDate, CampaignType? type, CampaignPriceType? priceType, int? productCount, int? freeProductCount, int? limit, int? used, bool? showOnMain, PhotoDTO? photo, List<
ProductDTO> ? products, List<String> ? tags}) -
CampaignDTO.fromJson(Map<
String, dynamic> json)
Properties
- createdAt ↔ String?
-
The time when the DTO was created.
getter/setter pairinherited
- description ↔ String?
-
getter/setter pair
- discountEndDate ↔ String?
-
getter/setter pair
- discountStartDate ↔ String?
-
getter/setter pair
- freeProductCount ↔ int?
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- id ↔ String?
-
The ID of the DTO.
getter/setter pairinherited
- isActive ↔ bool?
-
Whether the DTO is active.
getter/setter pairinherited
- isDeleted ↔ bool?
-
Whether the DTO has been deleted.
getter/setter pairinherited
- limit ↔ int?
-
getter/setter pair
- photo ↔ PhotoDTO?
-
getter/setter pair
- priceType ↔ CampaignPriceType?
-
getter/setter pair
- productCount ↔ int?
-
getter/setter pair
-
products
↔ List<
ProductDTO> ? -
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showOnMain ↔ bool?
-
getter/setter pair
-
getter/setter pair
- title ↔ String?
-
getter/setter pair
- type ↔ CampaignType?
-
getter/setter pair
- updatedAt ↔ String?
-
The time when the DTO was last updated.
getter/setter pairinherited
- used ↔ int?
-
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.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited