import 'package:freezed_annotation/freezed_annotation.dart';

part 'business_member_model.g.dart';

@JsonSerializable(fieldRename: FieldRename.snake)
class BusinessMemberModel {
  final String id;
  final String firstName;
  final String lastName;
  final String title;
  final AuthInfo? authInfo;

  BusinessMemberModel({
    required this.id,
    required this.firstName,
    required this.lastName,
    required this.title,
    this.authInfo,
  });

  factory BusinessMemberModel.fromJson(Map<String, dynamic> json) {
    return _$BusinessMemberModelFromJson(json);
  }

  Map<String, dynamic> toJson() => _$BusinessMemberModelToJson(this);
}

@JsonSerializable(fieldRename: FieldRename.snake)
class AuthInfo {
  final String email;
  final String phone;

  AuthInfo({
    required this.email,
    required this.phone,
  });

  factory AuthInfo.fromJson(Map<String, dynamic> json) {
    return _$AuthInfoFromJson(json);
  }

  Map<String, dynamic> toJson() => _$AuthInfoToJson(this);
}
