class GiftItemModel {
  int id;
  String name;
  int price;
  int amount;//用户当前拥有的数量
  String imgurl;

  GiftItemModel({this.id, this.name, this.price, this.imgurl, this.amount});

  GiftItemModel.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    name = json['name'];
    price = json['price'];
    imgurl = json['imgurl'];
    amount = json['amount'];
  }

  GiftItemModel.havedFromJson(Map<String, dynamic> json) {
    id = json['Id'];
    name = json['Name'];
    imgurl = json['ImgUrl'];
    amount = json['GetAmount'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['name'] = this.name;
    data['price'] = this.price;
    data['imgurl'] = this.imgurl;
    data['amount'] = this.amount;
    return data;
  }
}
