mirrored_repositories/Expenses_Tracker_App/packages/expense_repository/lib/src
import 'package:expense_repository/auth_repository.dart';

class UserModel {
  String? userId;
  String? fullName;
  String? email;

  UserModel({
    this.userId,
    this.fullName,
    this.email,
  });

  static final empty = UserModel(
    userId: '',
    fullName: '',
    email: '',
  );

  factory UserModel.fromMap(Map<String, dynamic> map) {
    return UserModel(
      userId: map['userId'],
      fullName: map['fullName'],
      email: map['email'],
    );
  }
  UserEntity toEntity() {
    return UserEntity(
      userId: userId,
      fullName: fullName,
      email: email,
    );
  }

  static UserModel formEntity(UserEntity entity) {
    return UserModel(
      userId: entity.userId,
      fullName: entity.fullName,
      email: entity.email,
    );
  }
}
