import 'package:satu/core/utils/utils_parse.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; String? username; int? shard; String? message; bool? operation; static AuthResponse fromMap(dynamic map) { final AuthResponse authResponseBean = AuthResponse(); authResponseBean.userId = cast(map['user_id']); authResponseBean.companyId = cast(map['company_id']); authResponseBean.kassaId = cast(map['kassa_id']); authResponseBean.token = cast(map['token']); authResponseBean.authAt = cast(map['auth_at']); authResponseBean.shard = cast(map['shard']); authResponseBean.message = cast(map['message']); authResponseBean.operation = map['operation'] as bool? ?? false; authResponseBean.username = cast(map['username']); return authResponseBean; } Map toJson() { final Map map = { 'user_id': userId, 'company_id': companyId, 'kassa_id': kassaId, 'token': token, 'auth_at': authAt, 'shard': shard, 'message': message, 'operation': operation, 'username' : username }; return map; } }