// ignore_for_file: invalid_annotation_target

import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:tm_app/data/services/model/customer/customer.dart';

import '../error/error_model.dart';

part 'login_data.freezed.dart';
part 'login_data.g.dart';

@freezed
abstract class LoginData with _$LoginData {
  const factory LoginData({
    required Customer? customer,
    required ErrorModel? error,
    @JsonKey(name: 'access_token') required String? accessToken,
    @JsonKey(name: 'refresh_token') required String? refreshToken,
    @JsonKey(name: 'expires_at') required int? expiresAt,
  }) = _LoginData;

  factory LoginData.fromJson(Map<String, Object?> json) =>
      _$LoginDataFromJson(json);
}
