import 'package:flutter_tracker/model/base_model.dart'; /// Description: /// Time : 2021年12月03日 Friday /// Author : liuyuqi.gov@msncn class UserModel { String id = ""; // 用户id String username = ""; //用户名 String pwd = ""; // 密码 String deviceid = ""; String updateTime = ""; String nickname = ""; int sex = 1; // 性别:1男2女 String avatar = ""; // 头像 int type = 1; //类型:2商家,1顾客 UserModel( {this.id = "", this.username = "", this.nickname = "", required this.deviceid, this.updateTime = "", this.pwd = "", this.sex = 1, this.avatar = "", this.type = 1}); UserModel.fromJson(Map json) { avatar = json["avatar"]; } } class UserEntity { late UserModel user; late BaseModel msg; UserEntity(this.user, this.msg); UserEntity.fromJson(Map json) { msg = BaseModel.fromJson(json); if (msg.success) { user = UserModel.fromJson(json); } } }