28 lines
708 B
Dart
28 lines
708 B
Dart
import 'package:sk_base_mobile/models/user_info.model.dart';
|
|
|
|
class Auth {
|
|
bool? isFirstRegister;
|
|
String? token;
|
|
UserInfoModel? userInfo;
|
|
|
|
Auth({this.isFirstRegister, this.token, this.userInfo});
|
|
|
|
Auth.fromJson(Map<String, dynamic> json) {
|
|
isFirstRegister = json['isFirstRegister'];
|
|
token = json['token'];
|
|
userInfo = json['userInfo'] != null
|
|
? UserInfoModel.fromJson(json['userInfo'])
|
|
: null;
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = Map<String, dynamic>();
|
|
data['isFirstRegister'] = isFirstRegister;
|
|
data['token'] = token;
|
|
if (userInfo != null) {
|
|
data['userInfo'] = userInfo!.toJson();
|
|
}
|
|
return data;
|
|
}
|
|
}
|