class AuthModel {
  final String token;
  final AuthDoctorModel model;

  AuthModel({
    required this.token,
    required this.model,
  });
}

class AuthDoctorModel {

  // "M_UserID": "1",
  // "M_UserUsername": "alhadad",
  // "M_UserM_DoctorCode": "3101210841",
  // "M_UserM_DoctorID": "9562",
  // "M_UserM_StaffID": "376",
  // "ip": "139.194.156.91",
  // "agent": "PostmanRuntime/7.29.2"
  
  // late String doctorID;
  // late String doctorName;

  // new
  late String M_UserID;
  late String M_UserUsername;
  late String M_UserEmail;
  // late String M_UserM_DoctorCode;
  // late String M_UserM_DoctorID;
  // late String M_UserM_StaffID;
  // late String M_UserM_MouID;
  late String ip;
  late String agent;

  AuthDoctorModel({
    // required this.doctorID,
    // required this.doctorName,

    required this.M_UserID,
    required this.M_UserUsername,
    required this.M_UserEmail,
    // required this.M_UserM_DoctorCode,
    // required this.M_UserM_DoctorID,
    // this.M_UserM_StaffID = "",
    // this.M_UserM_MouID = "",
    this.ip = "",
    this.agent = ""
  });

  AuthDoctorModel.fromJson(Map<String, dynamic> json) {
    M_UserID = json['M_UserID'].toString();
    M_UserUsername = json['M_UserUsername'].toString();
    M_UserEmail = json['M_UserEmail'].toString();
    // M_UserM_DoctorCode = json['M_UserM_DoctorCode'].toString();
    // M_UserM_DoctorID = json['M_UserM_DoctorID'].toString();
    // M_UserM_StaffID = json['M_UserM_StaffID'].toString();
    // M_UserM_MouID = json['M_UserM_MouID'].toString();
    ip = json['ip'].toString();
    agent = json['agent'].toString();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['M_UserID'] = M_UserID;
    data['M_UserUsername'] = M_UserUsername;
    data['M_UserEmail'] = M_UserEmail;
    // data['M_UserM_DoctorCode'] = M_UserM_DoctorCode;
    // data['M_UserM_DoctorID'] = M_UserM_DoctorID;
    // data['M_UserM_StaffID'] = M_UserM_StaffID;
    // data['M_UserM_MouID'] = M_UserM_MouID;
    data['ip'] = ip;
    data['agent'] = agent;

    return data;
  }
}
