import 'package:freezed_annotation/freezed_annotation.dart';

part 'sign_up_response_model.freezed.dart';
part 'sign_up_response_model.g.dart';

@freezed
abstract class SignUpResponseModel with _$SignUpResponseModel {
  const factory SignUpResponseModel({
    required bool isCreated,
    required SignUpResponseItemModel item,
  }) = _SignUpResponseModel;

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

@freezed
abstract class SignUpResponseItemModel with _$SignUpResponseItemModel {
  const factory SignUpResponseItemModel({required String token}) =
      _SignUpResponseItemModel;

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