import 'package:account/src/features/change_password/domain/models/entities/change_password_request_entity.dart';
import 'package:freezed_annotation/freezed_annotation.dart';

part 'change_password_request_model.freezed.dart';
part 'change_password_request_model.g.dart';

@freezed
abstract class ChangePasswordRequestModel with _$ChangePasswordRequestModel {
  const factory ChangePasswordRequestModel({
    required String password,
  }) = _ChangePasswordRequestModel;

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

extension ChangePasswordRequestModelMapper on ChangePasswordRequestEntity {
  ChangePasswordRequestModel toModel() => ChangePasswordRequestModel(
    password: password,
  );
}
