user.dart
1.29 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
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 sellerphone;//商户电话
String sellerAddr;//商户地址
int scatter;//是否有散座 0无 1有
int room;//是否有包间 0无 1有
int cassette;//是否有卡座 0无 1有
String morning;//早市时间段
String noon;//午市时间段
String night;//晚市时间段
User(this.openid, this.account, this.role_name, this.sellerid,
this.sellercode, this.sellername, this.sellerphone, this.sellerAddr,
this.scatter, this.room, this.cassette, this.morning, this.noon,
this.night);
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, sellerphone: $sellerphone, sellerAddr: $sellerAddr, scatter: $scatter, room: $room, cassette: $cassette, morning: $morning, noon: $noon, night: $night}';
}
}