You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
diplomatic-quarter/lib/core/model/pharmacies/Manufacturer.dart

99 lines
2.9 KiB
Dart

import 'PharmacyImageObject.dart';
class Manufacturer {
String id;
String name;
String namen;
// List<LocalizedNames> localizedNames;
String description;
int manufacturerTemplateId;
String metaKeywords;
String metaDescription;
String metaTitle;
int pageSize;
String pageSizeOptions;
String priceRanges;
bool published;
bool deleted;
int displayOrder;
String createdOnUtc;
String updatedOnUtc;
PharmacyImageObject image;
Manufacturer(
{this.id,
this.name,
this.namen,
// this.localizedNames,
this.description,
this.manufacturerTemplateId,
this.metaKeywords,
this.metaDescription,
this.metaTitle,
this.pageSize,
this.pageSizeOptions,
this.priceRanges,
this.published,
this.deleted,
this.displayOrder,
this.createdOnUtc,
this.updatedOnUtc,
this.image});
Manufacturer.fromJson(Map<String, dynamic> json) {
id = json['id'];
name = json['name'];
namen = json['namen'];
// if (json['localized_names'] != null) {
// localizedNames = new List<LocalizedNames>();
// json['localized_names'].forEach((v) {
// localizedNames.add(new LocalizedNames.fromJson(v));
// });
// }
description = json['description'];
manufacturerTemplateId = json['manufacturer_template_id'];
metaKeywords = json['meta_keywords'];
metaDescription = json['meta_description'];
metaTitle = json['meta_title'];
pageSize = json['page_size'];
pageSizeOptions = json['page_size_options'];
priceRanges = json['price_ranges'];
published = json['published'];
deleted = json['deleted'];
displayOrder = json['display_order'];
createdOnUtc = json['created_on_utc'];
updatedOnUtc = json['updated_on_utc'];
image = json['image'] != null
? new PharmacyImageObject.fromJson(json['image'])
: null;
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['name'] = this.name;
data['namen'] = this.namen;
// if (this.localizedNames != null) {
// data['localized_names'] =
// this.localizedNames.map((v) => v.toJson()).toList();
// }
data['description'] = this.description;
data['manufacturer_template_id'] = this.manufacturerTemplateId;
data['meta_keywords'] = this.metaKeywords;
data['meta_description'] = this.metaDescription;
data['meta_title'] = this.metaTitle;
data['page_size'] = this.pageSize;
data['page_size_options'] = this.pageSizeOptions;
data['price_ranges'] = this.priceRanges;
data['published'] = this.published;
data['deleted'] = this.deleted;
data['display_order'] = this.displayOrder;
data['created_on_utc'] = this.createdOnUtc;
data['updated_on_utc'] = this.updatedOnUtc;
if (this.image != null) {
data['image'] = this.image.toJson();
}
return data;
}
}