You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
731 B
32 lines
731 B
class CampAd {
|
|
String postId;
|
|
String campaignId;
|
|
bool approved;
|
|
|
|
CampAd({
|
|
this.approved,
|
|
this.campaignId,
|
|
this.postId,
|
|
});
|
|
|
|
factory CampAd.fromJSON(Map<String, dynamic> json) {
|
|
return CampAd(
|
|
postId: json["postID"],
|
|
campaignId: json["campaignId"],
|
|
approved: json["approved"] != null ? json["approved"] : false,
|
|
);
|
|
}
|
|
|
|
Map<dynamic, dynamic> toJson() {
|
|
final Map<dynamic, dynamic> data = Map<dynamic, dynamic>();
|
|
data['postId'] = this.postId;
|
|
data['approved'] = this.approved;
|
|
data['campaignId'] = this.campaignId;
|
|
return data;
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return '{"postId": "$postId","approved":"$approved","campaignId" :"$campaignId"}';
|
|
}
|
|
}
|
|
|