12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- import 'package:flutter_tracker/model/message_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男2女
- String avatar; // 头像
- int healthStatus; //类型:2商家,1顾客
- UserModel(
- {this.id,
- this.username,
- this.nickname,
- this.deviceid,
- this.updateTime,
- this.pwd,
- this.sex,
- this.avatar,
- this.healthStatus});
- UserModel.fromJson(Map<String, dynamic> json) {
- username = json["username"];
- pwd = json["password"];
- avatar = json["avatar"];
- updateTime = json["modifytime"];
- healthStatus = int.parse(json["health_status"]);
- }
- }
- class UserEntity {
- UserModel user;
- MessageModel msg;
- UserEntity(this.user, this.msg);
- UserEntity.fromJson(Map<String, dynamic> json) {
- msg = MessageModel.fromJson(json);
- if (msg.success) {
- user = UserModel.fromJson(json["data"]);
- }
- }
- }
|