import 'package:json_annotation/json_annotation.dart';

part 'home_goods_model.g.dart';

@JsonSerializable()
class HomeGoodsModel extends Object {
  @JsonKey(name: 'provider_name')
  String providerName;

  @JsonKey(name: 'good_id')
  String goodId;

  @JsonKey(name: 'good_image')
  String goodImage;

  @JsonKey(name: 'good_title')
  String goodTitle;

  @JsonKey(name: 'shop_name')
  String shopName;

  @JsonKey(name: 'coupon')
  String coupon;

  @JsonKey(name: 'commission')
  String commission;

  @JsonKey(name: 'market_price')
  String marketPrice;

  @JsonKey(name: 'current_price')
  String currentPrice;

  @JsonKey(name: 'inorder_count')
  String inorderCount;

  HomeGoodsModel(
    this.providerName,
    this.goodId,
    this.goodImage,
    this.goodTitle,
    this.shopName,
    this.coupon,
    this.commission,
    this.marketPrice,
    this.currentPrice,
    this.inorderCount,
  );

  factory HomeGoodsModel.fromJson(Map<String, dynamic> srcJson) =>
      _$HomeGoodsModelFromJson(srcJson);

  Map<String, dynamic> toJson() => _$HomeGoodsModelToJson(this);
}
