import 'package:equatable/equatable.dart';
import 'user_model.dart';

class LoginModel extends Equatable {
  final String? accessToken;
  final String? refreshToken;
  final UserModel? user;

  const LoginModel({
    this.accessToken,
    this.refreshToken,
    this.user,
  });

  factory LoginModel.fromJson(Map<String, dynamic> json) {
    return LoginModel(
      accessToken: json['accessToken'] as String?,
      refreshToken: json['refreshToken'] as String?,
      user: UserModel.fromJson(json),
    );
  }

  @override
  List<Object?> get props => [accessToken, refreshToken, user];
}
