import 'package:freezed_annotation/freezed_annotation.dart';

part 'trakt_token.freezed.dart';
part 'trakt_token.g.dart';


@freezed
abstract class TraktToken with _$TraktToken {
  const factory TraktToken({
    @JsonKey(name: 'access_token') @Default('') String accessToken,
    @JsonKey(name: 'refresh_token') @Default('') String refreshToken,
    @JsonKey(name: 'expires_in') @Default(0) int expiresIn,
    @JsonKey(name: 'created_at') @Default(0) int createdAt,
    @JsonKey(name: 'token_type') @Default('') String tokenType,
    @Default('') String scope,
  }) = _TraktToken;

  factory TraktToken.fromJson(Map<String, dynamic> json) =>
      _$TraktTokenFromJson(json);
}
