user.dart
1.71 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
import 'package:json_annotation/json_annotation.dart';
part 'user.g.dart';
//User实体类
@JsonSerializable()
class User {
String openid; //商户openid
String account; //账号
String role_name; //角色名称
String sellerid; //商户id
String sellercode; //商户编号
String sellername; //商户名称
String sellerimage; //商户图片
String sellerphone; //商户电话
String sellerAddr; //商户地址
int scatter; //是否有散座 0无 1有
int room; //是否有包间 0无 1有
int cassette; //是否有卡座 0无 1有
String morning; //早市时间段
String noon; //午市时间段
String night; //晚市时间段
String userphone; //角色电话
String token; //token
String nickName; // 昵称
String edate; //店铺过期日期
User(
this.openid,
this.account,
this.role_name,
this.sellerid,
this.sellercode,
this.sellername,
this.sellerimage,
this.sellerphone,
this.sellerAddr,
this.scatter,
this.room,
this.cassette,
this.morning,
this.noon,
this.night,
this.userphone,
this.token,
this.nickName,
this.edate);
factory User.fromJson(Map<String, dynamic> json) => _$UserFromJson(json);
Map<String, dynamic> toJson() => _$UserToJson(this);
@override
String toString() {
return 'User{openid: $openid, account: $account, role_name: $role_name, sellerid: $sellerid, sellercode: $sellercode, sellername: $sellername,sellerimage:$sellerimage, sellerphone: $sellerphone, sellerAddr: $sellerAddr, scatter: $scatter, room: $room, cassette: $cassette, morning: $morning, noon: $noon, night: $night ,userphone:$userphone,token:$token,nickName:$nickName,edate:$edate}';
}
}