wechat_pay_model.dart
1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import 'package:json_annotation/json_annotation.dart';
part 'wechat_pay_model.g.dart';
@JsonSerializable()
class WechatPayModel extends Object {
@JsonKey(name: 'ret')
int ret;
@JsonKey(name: 'data')
WechatPaySunModel data;
@JsonKey(name: 'msg')
String msg;
WechatPayModel(
this.ret,
this.data,
this.msg,
);
factory WechatPayModel.fromJson(Map<String, dynamic> srcJson) =>
_$WechatPayModelFromJson(srcJson);
Map<String, dynamic> toJson() => _$WechatPayModelToJson(this);
}
@JsonSerializable()
class WechatPaySunModel extends Object {
@JsonKey(name: 'appId')
String appId;
@JsonKey(name: 'timeStamp')
String timeStamp;
@JsonKey(name: 'nonceStr')
String nonceStr;
@JsonKey(name: 'package')
String package;
@JsonKey(name: 'signType')
String signType;
@JsonKey(name: 'paySign')
String paySign;
WechatPaySunModel(
this.appId,
this.timeStamp,
this.nonceStr,
this.package,
this.signType,
this.paySign,
);
factory WechatPaySunModel.fromJson(Map<String, dynamic> srcJson) =>
_$WechatPaySunModelFromJson(srcJson);
Map<String, dynamic> toJson() => _$WechatPaySunModelToJson(this);
}