user.dart 2.24 KB
import 'package:json_annotation/json_annotation.dart';
part 'user.g.dart';

//User实体类
@JsonSerializable()
class User {
  String? openid; //商户openid
  String? account; //账号
  String? role_name; //角色名称
   String? role_name_addition; //角色名称(只订不服,只服不订)
  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? userphoneMyPage; //我的页面---个人信息页面的手机号
  String? token; //token
  String? nickName; // 昵称
  String? edate; //店铺过期日期

  String? tokenLoginOut; //信鸽token
  String? sellerVersion; //版本

  User(
      this.openid,
      this.account,
      this.role_name,
      this.role_name_addition,
      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.userphoneMyPage,
      this.token,
      this.nickName,
      this.edate,
      this.tokenLoginOut,
      this.sellerVersion);

  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,role_name_addition:$role_name_addition, 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,userphoneMyPage:$userphoneMyPage,token:$token,nickName:$nickName,edate:$edate,tokenLoginOut:$tokenLoginOut,sellerVersion:$sellerVersion}';
  }
}