import 'package:firebase_auth/firebase_auth.dart';

class UserModel {
  final String uid;
  final String? displayName;
  final String? phoneNumber;
  final String? email;
  final String? photoURL;

  UserModel({
    required this.uid,
    this.displayName,
    this.phoneNumber,
    this.email,
    this.photoURL,
  });

  factory UserModel.fromFirebaseUser(User user) {
    return UserModel(
      uid: user.uid,
      displayName: user.displayName,
      phoneNumber: user.phoneNumber,
      email: user.email,
      photoURL: user.photoURL,
    );
  }

  @override
  String toString() {
    return 'UserModel(uid: $uid, displayName: $displayName, phoneNumber: $phoneNumber, email: $email, photoURL: $photoURL)';
  }
}
