47 lines
1.3 KiB
Dart
47 lines
1.3 KiB
Dart
/// user_id : 10
|
|
/// company_id : 281
|
|
/// kassa_id : 3
|
|
/// token : "nFH2bzcwAQ4UMpzT5TVVvZr7QaljNfpmG0aqUzgU6J9gXnaDPo4VvBa3CNUn"
|
|
/// auth_at : "2021-04-30\n11:38:52"
|
|
/// shard : 1
|
|
/// message : "Authorization confirm"
|
|
/// operation : true
|
|
|
|
class AuthResponse {
|
|
int? userId;
|
|
int? companyId;
|
|
int? kassaId;
|
|
String? token;
|
|
String? authAt;
|
|
int? shard;
|
|
String? message;
|
|
bool? operation;
|
|
|
|
static AuthResponse fromMap(dynamic map) {
|
|
final AuthResponse authResponseBean = AuthResponse();
|
|
authResponseBean.userId = map['user_id'] as int;
|
|
authResponseBean.companyId = map['company_id'] as int;
|
|
authResponseBean.kassaId = map['kassa_id'] as int;
|
|
authResponseBean.token = map['token']?.toString();
|
|
authResponseBean.authAt = map['auth_at']?.toString();
|
|
authResponseBean.shard = map['shard'] as int;
|
|
authResponseBean.message = map['message']?.toString();
|
|
authResponseBean.operation = map['operation'] as bool;
|
|
return authResponseBean;
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> map = <String, dynamic>{
|
|
'user_id': userId,
|
|
'company_id': companyId,
|
|
'kassa_id': kassaId,
|
|
'token': token,
|
|
'auth_at': authAt,
|
|
'shard': shard,
|
|
'message': message,
|
|
'operation': operation,
|
|
};
|
|
return map;
|
|
}
|
|
}
|