import 'package:json_annotation/json_annotation.dart';
import 'package:zhiying_base_widget/widgets/mine/mine_header/model/mine_profile_model.dart';

part 'mine_data_model.g.dart';

@JsonSerializable()
class MineDataModel extends Object {
  @JsonKey(name: 'accumulated_earnings_name_color')
  String accumulatedEarningsNameColor;

  @JsonKey(name: 'accumulated_earnings_color')
  String accumulatedEarningsColor;

  @JsonKey(name: 'accumulated_earnings_bg_img')
  String accumulatedEarningsBgImg;

  @JsonKey(name: 'btn_text')
  String btnText;

  @JsonKey(name: 'btn_text_color')
  String btnTextColor;

  @JsonKey(name: 'btn_img')
  String btnImg;

  @JsonKey(name: 'required_login')
  String requiredLogin;

  @JsonKey(name: 'required_taobao_auth')
  String requiredTaobaoAuth;

  @JsonKey(name: 'skip_identifier')
  String skipIdentifier;

  @JsonKey(name: 'grid_view_bg_color')
  String gridViewBgColor;

  @JsonKey(name: 'grid_view_name_color')
  String gridViewNameColor;

  @JsonKey(name: 'grid_view_value_color')
  String gridViewValueColor;

  @JsonKey(name: 'grid_view')
  List<MineProfileDataModel> datas;

  MineDataModel(
    this.accumulatedEarningsNameColor,
    this.accumulatedEarningsColor,
    this.accumulatedEarningsBgImg,
    this.btnText,
    this.btnTextColor,
    this.btnImg,
    this.requiredLogin,
    this.requiredTaobaoAuth,
    this.skipIdentifier,
    this.gridViewBgColor,
    this.gridViewNameColor,
    this.gridViewValueColor,
    this.datas,
  );

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

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