29 lines
607 B
Dart
29 lines
607 B
Dart
import 'package:json_annotation/json_annotation.dart';
|
|
|
|
part 'user_model.g.dart';
|
|
|
|
@JsonSerializable()
|
|
class UserModel {
|
|
@JsonKey(name: 'user_id')
|
|
final int? userId;
|
|
|
|
final bool? profileCompleted;
|
|
|
|
@JsonKey(name: 'access_token')
|
|
final String? accessToken;
|
|
|
|
@JsonKey(name: 'refresh_token')
|
|
final String? refreshToken;
|
|
|
|
const UserModel(
|
|
{this.userId,
|
|
this.accessToken,
|
|
this.profileCompleted,
|
|
this.refreshToken});
|
|
|
|
factory UserModel.fromJson(Map<String, dynamic> json) =>
|
|
_$UserModelFromJson(json);
|
|
|
|
Map<String, dynamic> toJson() => _$UserModelToJson(this);
|
|
}
|