user_history_entity.dart
810 Bytes
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
import 'package:json_annotation/json_annotation.dart';
part 'user_history_entity.g.dart';
@JsonSerializable()
class UserHistoryEntity extends Object {
@JsonKey(name: 'id')
String id;
@JsonKey(name: 'sid')
String sid;
@JsonKey(name: 'rname')
String rname;
@JsonKey(name: 'sex')
String sex;
@JsonKey(name: 'phone')
String phone;
@JsonKey(name: 'cusdem')
String cusdem;
List<String> pinyinList; //全拼数组
String pinyin; //全拼字母
String pinyinFirst; //首字母
UserHistoryEntity(
this.id,
this.sid,
this.rname,
this.sex,
this.phone,
this.cusdem,
);
factory UserHistoryEntity.fromJson(Map<String, dynamic> srcJson) =>
_$UserHistoryEntityFromJson(srcJson);
Map<String, dynamic> toJson() => _$UserHistoryEntityToJson(this);
}