part of models;

class ReadModel {

  ReadModel({
    required this.value,
    required this.name,
    this.link,
    this.icon
  });

  String value;
  String name;
  String? link;
  String? icon;
}


/// 紫金币 积分  模型
///
class RecordModel {
  RecordModel({
    this.integralId,
    this.options,
    this.numbers,
    this.result,
    this.remarks,
    this.createTime,});

  RecordModel.fromJson(dynamic json) {
    integralId = json['integral_id'];
    options = json['options'];
    numbers = json['numbers'];
    result = json['result'];
    remarks = json['remarks'];
    createTime = json['create_time'];
  }
  num? integralId;
  num? options;
  num? numbers;
  num? result;
  String? remarks;
  String? createTime;
  RecordModel copyWith({  num? integralId,
    num? options,
    num? numbers,
    num? result,
    String? remarks,
    String? createTime,
  }) => RecordModel(  integralId: integralId ?? this.integralId,
    options: options ?? this.options,
    numbers: numbers ?? this.numbers,
    result: result ?? this.result,
    remarks: remarks ?? this.remarks,
    createTime: createTime ?? this.createTime,
  );
  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['integral_id'] = integralId;
    map['options'] = options;
    map['numbers'] = numbers;
    map['result'] = result;
    map['remarks'] = remarks;
    map['create_time'] = createTime;
    return map;
  }

}

/// 优惠券模型
///
class CouponModel {
  CouponModel({
    this.couponRecId,
    this.endTime,
    this.couponId,
    this.useStatus,
    this.couponName,
    this.normPrice,
    this.reducedPrice,});

  CouponModel.fromJson(dynamic json) {
    couponRecId = json['coupon_rec_id'];
    endTime = json['end_time'];
    couponId = json['coupon_id'];
    useStatus = json['use_status'];
    couponName = json['coupon_name'];
    normPrice = json['norm_price'];
    reducedPrice = json['reduced_price'];
  }
  num? couponRecId;
  String? endTime;
  num? couponId;
  num? useStatus;
  String? couponName;
  num? normPrice;
  String? reducedPrice;
  CouponModel copyWith({  num? couponRecId,
    String? endTime,
    num? couponId,
    num? useStatus,
    String? couponName,
    num? normPrice,
    String? reducedPrice,
  }) => CouponModel(  couponRecId: couponRecId ?? this.couponRecId,
    endTime: endTime ?? this.endTime,
    couponId: couponId ?? this.couponId,
    useStatus: useStatus ?? this.useStatus,
    couponName: couponName ?? this.couponName,
    normPrice: normPrice ?? this.normPrice,
    reducedPrice: reducedPrice ?? this.reducedPrice,
  );
  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['coupon_rec_id'] = couponRecId;
    map['end_time'] = endTime;
    map['coupon_id'] = couponId;
    map['use_status'] = useStatus;
    map['coupon_name'] = couponName;
    map['norm_price'] = normPrice;
    map['reduced_price'] = reducedPrice;
    return map;
  }

}

/// 更新模型
class UpdateModel {
  UpdateModel({
    this.version,
    this.url,
    this.remarks,});

  UpdateModel.fromJson(dynamic json) {
    version = json['version'];
    url = json['url'];
    remarks = json['remarks'];
  }
  String? version;
  String? url;
  String? remarks;
  UpdateModel copyWith({  String? version,
    String? url,
    String? remarks,
  }) => UpdateModel(  version: version ?? this.version,
    url: url ?? this.url,
    remarks: remarks ?? this.remarks,
  );
  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['version'] = version;
    map['url'] = url;
    map['remarks'] = remarks;
    return map;
  }
}

/// 版本介绍模型
class VersionModel {
  VersionModel({
    this.id,
    this.version,
    this.remarks,
    this.url,
    this.createTime,
    this.updateTime,});

  VersionModel.fromJson(dynamic json) {
    id = json['id'];
    version = json['version'];
    remarks = json['remarks'];
    url = json['url'];
    createTime = json['create_time'];
    updateTime = json['update_time'];
  }
  num? id;
  String? version;
  String? remarks;
  String? url;
  String? createTime;
  String? updateTime;
  VersionModel copyWith({  num? id,
    String? version,
    String? remarks,
    String? url,
    String? createTime,
    String? updateTime,
  }) => VersionModel(  id: id ?? this.id,
    version: version ?? this.version,
    remarks: remarks ?? this.remarks,
    url: url ?? this.url,
    createTime: createTime ?? this.createTime,
    updateTime: updateTime ?? this.updateTime,
  );
  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['id'] = id;
    map['version'] = version;
    map['remarks'] = remarks;
    map['url'] = url;
    map['create_time'] = createTime;
    map['update_time'] = updateTime;
    return map;
  }

}


class UserInfoModel {
  UserInfoModel({
    this.name,
    this.headImg,
    this.sex,
    this.phone,
    this.couponNums,
    this.commentNums,
    this.ordersNums,
    this.noteNums,
    this.wrongNums,
    this.collectNums,
    this.integralNums,
    this.password,
    this.gradeId,
    this.gradeName,
    this.beanNums,});

  UserInfoModel.fromJson(dynamic json) {
    name = json['name'];
    headImg = json['head_img'];
    sex = json['sex'];
    phone = json['phone'];
    couponNums = json['coupon_nums'];
    commentNums = json['comment_nums'];
    ordersNums = json['orders_nums'];
    noteNums = json['note_nums'];
    wrongNums = json['wrong_nums'];
    collectNums = json['collect_nums'];
    integralNums = json['integral_nums'];
    password = json['password'];
    gradeId = json['grade_id'];
    gradeName = json['grade_name'];
    beanNums = json['bean_nums'];
  }
  String? name;
  String? headImg;
  num? sex;
  String? phone;
  num? couponNums;
  num? commentNums;
  num? ordersNums;
  num? noteNums;
  num? wrongNums;
  num? collectNums;
  num? integralNums;
  String? password;
  num? gradeId;
  String? gradeName;
  String? beanNums;
  UserInfoModel copyWith({  String? name,
    String? headImg,
    num? sex,
    String? phone,
    num? couponNums,
    num? commentNums,
    num? ordersNums,
    num? noteNums,
    num? wrongNums,
    num? collectNums,
    num? integralNums,
    String? password,
    num? gradeId,
    String? gradeName,
    String? beanNums,
  }) => UserInfoModel(  name: name ?? this.name,
    headImg: headImg ?? this.headImg,
    sex: sex ?? this.sex,
    phone: phone ?? this.phone,
    couponNums: couponNums ?? this.couponNums,
    commentNums: commentNums ?? this.commentNums,
    ordersNums: ordersNums ?? this.ordersNums,
    noteNums: noteNums ?? this.noteNums,
    wrongNums: wrongNums ?? this.wrongNums,
    collectNums: collectNums ?? this.collectNums,
    integralNums: integralNums ?? this.integralNums,
    password: password ?? this.password,
    gradeId: gradeId ?? this.gradeId,
    gradeName: gradeName ?? this.gradeName,
    beanNums: beanNums ?? this.beanNums,
  );
  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['name'] = name;
    map['head_img'] = headImg;
    map['sex'] = sex;
    map['phone'] = phone;
    map['coupon_nums'] = couponNums;
    map['comment_nums'] = commentNums;
    map['orders_nums'] = ordersNums;
    map['note_nums'] = noteNums;
    map['wrong_nums'] = wrongNums;
    map['collect_nums'] = collectNums;
    map['integral_nums'] = integralNums;
    map['password'] = password;
    map['grade_id'] = gradeId;
    map['grade_name'] = gradeName;
    map['bean_nums'] = beanNums;
    return map;
  }

}