summaryrefslogblamecommitdiff
path: root/iridescence/src/models/product.js
blob: c408b79e53e63881b04b9ee8e13c588e09f41b78 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
                              











                                                                                

     
 
export default class Product {
  constructor(json) {
    if (json) {
      this.id = json.id ? json.id : null;
      this.name = json.name ? json.name : null;
      this.description = json.description ? json.description : null;
      this.cents = json.cents ? json.cents : null;
      this.quantity = json.quantity ? json.quantity : null;
      this.featured = json.featured ? json.featured : false;
      this.category = json.category ? json.category : null;
      this.photo_base = json.photo_base ? json.photo_base : null;
      this.photo_thumbnail = json.photo_thumbnail ? json.photo_thumbnail : null;
      this.photo_fullsize = json.photo_fullsize ? json.photo_fullsize : null;
    }
  }
}