import 'package:json_annotation/json_annotation.dart';

part 'home_goods_header_model.g.dart';

@JsonSerializable()
class HomeGoodsHeaderModel extends Object {
  @JsonKey(name: 'mod_id')
  int modId;

  @JsonKey(name: 'mod_pid')
  int modPid;

  @JsonKey(name: 'mod_name')
  String modName;

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

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

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

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

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

  @JsonKey(name: 'aspect_ratio')
  String aspectRatio;

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

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

  @JsonKey(name: 'font_color')
  String fontColor;

  @JsonKey(name: 'bg_img')
  String bgImg;

  @JsonKey(name: 'bg_color')
  String bgColor;

  @JsonKey(name: 'bg_color_t')
  String bgColorT;

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

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

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

  @JsonKey(name: 'sort')
  int sort;

  @JsonKey(name: 'is_global')
  int isGlobal;

  HomeGoodsHeaderModel(
    this.modId,
    this.modPid,
    this.modName,
    this.position,
    this.title,
    this.subtitle,
    this.url,
    this.margin,
    this.aspectRatio,
    this.icon,
    this.img,
    this.fontColor,
    this.bgImg,
    this.bgColor,
    this.bgColorT,
    this.badge,
    this.path,
    this.data,
    this.sort,
    this.isGlobal,
  );

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

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