import 'package:json_annotation/json_annotation.dart';

part 'pay_way_info.g.dart';

@JsonSerializable()
class PayWayInfo {
  @JsonKey(name: 'id')
  int id;

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

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

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

  PayWayInfo(this.id, this.payMethod, this.payPlatform, this.title);

  factory PayWayInfo.fromJson(Map<String, dynamic> json) =>
      _$PayWayInfoFromJson(json);

  PayWayInfo copyWith() {
    return PayWayInfo(id, payMethod, payPlatform, title);
  }
}
