import 'package:json_annotation/json_annotation.dart';

part 'register_request_model.g.dart';

@JsonSerializable()
class RegisterRequestModel {
  @JsonKey(name: 'business_name')
  final String businessName;
  @JsonKey(name: 'business_code')
  final String businessCode;
  final String name;
  @JsonKey(name: 'phone_number')
  final String phoneNumber;
  final String? email;
  final String password;
  @JsonKey(name: 'password_confirmation')
  final String passwordConfirmation;

  RegisterRequestModel({
    required this.businessName,
    required this.businessCode,
    required this.name,
    required this.phoneNumber,
    this.email,
    required this.password,
    required this.passwordConfirmation,
  });

  factory RegisterRequestModel.fromJson(Map<String, dynamic> json) =>
      _$RegisterRequestModelFromJson(json);

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