Layout with Tools

1 MyDb (c) DbSchema Hover columns to read the comments. Fk adminmenus_ibfk_1 adminmenus ref admin_users ( admin_id -> id ) Fk adminmenus_ibfk_1 adminmenus ref admin_users ( admin_id -> id ) admin_id Fk assignmenus_ibfk_1 assignmenus ref admin_users ( admin_id -> id ) Fk assignmenus_ibfk_1 assignmenus ref admin_users ( admin_id -> id ) admin_id Fk driver_reviews_ibfk_1 driver_reviews ref drivers ( driver_id -> id ) Fk driver_reviews_ibfk_1 driver_reviews ref drivers ( driver_id -> id ) driver_id Fk driver_risk_scores_ibfk_2 driver_risk_scores ref admin_users ( added_by -> id ) Fk driver_risk_scores_ibfk_2 driver_risk_scores ref admin_users ( added_by -> id ) added_by Fk driver_risk_scores_ibfk_1 driver_risk_scores ref drivers ( driver_id -> id ) Fk driver_risk_scores_ibfk_1 driver_risk_scores ref drivers ( driver_id -> id ) driver_id Fk driver_verification_reviews_ibfk_1 driver_verification_reviews ref drivers ( driver_id -> id ) Fk driver_verification_reviews_ibfk_1 driver_verification_reviews ref drivers ( driver_id -> id ) driver_id Fk drivers_ibfk_7 drivers ref admin_users ( added_by -> id ) Fk drivers_ibfk_7 drivers ref admin_users ( added_by -> id ) added_by Fk drivers_ibfk_8 drivers ref admin_users ( approved_by -> id ) Fk drivers_ibfk_8 drivers ref admin_users ( approved_by -> id ) approved_by Fk drivers_ibfk_4 drivers ref document_types ( identification -> id ) Fk drivers_ibfk_4 drivers ref document_types ( identification -> id ) identification Fk drivers_ibfk_5 drivers ref employers ( added_by -> id ) Fk drivers_ibfk_5 drivers ref employers ( added_by -> id ) added_by Fk drivers_ibfk_6 drivers ref insurance_companies ( added_by -> id ) Fk drivers_ibfk_6 drivers ref insurance_companies ( added_by -> id ) added_by Fk drivers_ibfk_3 drivers ref lgas ( lga -> id ) Fk drivers_ibfk_3 drivers ref lgas ( lga -> id ) lga Fk drivers_ibfk_2 drivers ref states ( state -> id ) Fk drivers_ibfk_2 drivers ref states ( state -> id ) state Fk drivers_ibfk_1 drivers ref users ( user_id -> id ) Fk drivers_ibfk_1 drivers ref users ( user_id -> id ) user_id Fk employers_ibfk_4 employers ref document_types ( identification -> id ) Fk employers_ibfk_4 employers ref document_types ( identification -> id ) identification Fk employers_ibfk_3 employers ref lgas ( lga -> id ) Fk employers_ibfk_3 employers ref lgas ( lga -> id ) lga Fk employers_ibfk_2 employers ref states ( state -> id ) Fk employers_ibfk_2 employers ref states ( state -> id ) state Fk employers_ibfk_1 employers ref users ( user_id -> id ) Fk employers_ibfk_1 employers ref users ( user_id -> id ) user_id Fk insurance_companies_ibfk_2 insurance_companies ref document_types ( identification -> id ) Fk insurance_companies_ibfk_2 insurance_companies ref document_types ( identification -> id ) identification Fk insurance_companies_ibfk_1 insurance_companies ref users ( user_id -> id ) Fk insurance_companies_ibfk_1 insurance_companies ref users ( user_id -> id ) user_id Fk member_subscriptions_ibfk_1 member_subscriptions ref drivers ( driver_id -> id ) Fk member_subscriptions_ibfk_1 member_subscriptions ref drivers ( driver_id -> id ) driver_id Fk member_subscriptions_ibfk_2 member_subscriptions ref subscription_package ( package_id -> id ) Fk member_subscriptions_ibfk_2 member_subscriptions ref subscription_package ( package_id -> id ) package_id Fk messages_ibfk_1 messages ref users ( message_from -> id ) Fk messages_ibfk_1 messages ref users ( message_from -> id ) message_from Fk messages_ibfk_2 messages ref users ( message_to -> id ) Fk messages_ibfk_2 messages ref users ( message_to -> id ) message_to Fk notifications_ibfk_1 notifications ref drivers ( user_id -> id ) Fk notifications_ibfk_1 notifications ref drivers ( user_id -> id ) user_id Fk notifications_ibfk_2 notifications ref employers ( user_id -> id ) Fk notifications_ibfk_2 notifications ref employers ( user_id -> id ) user_id Fk notifications_ibfk_3 notifications ref insurance_companies ( user_id -> id ) Fk notifications_ibfk_3 notifications ref insurance_companies ( user_id -> id ) user_id Fk user_certificates_ibfk_1 user_certificates ref drivers ( user_id -> id ) Fk user_certificates_ibfk_1 user_certificates ref drivers ( user_id -> id ) user_id Fk wallet_transactions_ibfk_1 wallet_transactions ref wallets ( wallet_id -> id ) Fk wallet_transactions_ibfk_1 wallet_transactions ref wallets ( wallet_id -> id ) wallet_id Fk wallets_ibfk_5 wallets ref employers ( employer_id -> id ) Fk wallets_ibfk_5 wallets ref employers ( employer_id -> id ) employer_id Fk wallets_ibfk_4 wallets ref insurance_companies ( insurance_id -> id ) Fk wallets_ibfk_4 wallets ref insurance_companies ( insurance_id -> id ) insurance_id activity_trackerTable drivex_new.activity_tracker Pk pk_activity_tracker ( id ) idid * int int activity_done_byactivity_done_by * int user id int activity_done_by_typeactivity_done_by_type * int 1->Driver, 2->employer, 3->insurance_company int activity_descriptionactivity_description * text text created_atcreated_at * datetime datetime updated_atupdated_at * datetime datetime admin_usersTable drivex_new.admin_users Pk pk_admin_users ( id ) idid * int intReferred by adminmenus ( admin_id -> id ) Referred by assignmenus ( admin_id -> id ) Referred by driver_risk_scores ( added_by -> id ) Referred by drivers ( added_by -> id ) Referred by drivers ( approved_by -> id ) full_namefull_name * varchar(250) varchar(250) user_profile_imguser_profile_img varchar(255) varchar(255) unameuname * varchar(250) varchar(250) mail_idmail_id * varchar(250) varchar(250) passpass * varchar(250) varchar(250) contact_nocontact_no * varchar(250) varchar(250) is_activeis_active * int int created_atcreated_at datetime datetime updated_atupdated_at datetime datetime admin_typeadmin_type * varchar(255) varchar(255) adminmenusTable drivex_new.adminmenus Pk pk_adminmenus ( id ) idid * int int admin_id ( admin_id ) admin_idadmin_id * int intReferences admin_users ( admin_id -> id ) menu_namemenu_name * varchar(100) varchar(100) menu_linkmenu_link text text menu_typemenu_type int default 1 1 => Add, 2 => List int select_parentselect_parent int default 0 int order_noorder_no int default 0 int menu_classmenu_class varchar(200) varchar(200) statusstatus int default 1 int created_atcreated_at datetime datetime updated_atupdated_at datetime datetime assignmenusTable drivex_new.assignmenus Pk pk_assignmenus ( id ) idid * int int admin_id ( admin_id ) admin_idadmin_id * int intReferences admin_users ( admin_id -> id ) menuidmenuid * varchar(200) varchar(200) facilitiesfacilities text text created_atcreated_at datetime datetime updated_atupdated_at datetime datetime countriesTable drivex_new.countries Pk pk_countries ( id ) idid * int int Unq country_name ( name ) namename varchar(250) varchar(250) statusstatus boolean default true 1=active, 2=inactive boolean created_datecreated_date * date date document_typesTable drivex_new.document_types Pk pk_document_types ( id ) idid * int intReferred by drivers ( identification -> id ) Referred by employers ( identification -> id ) Referred by insurance_companies ( identification -> id ) type_nametype_name * int int created_atcreated_at datetime datetime updated_atupdated_at datetime datetime driver_reviewsTable drivex_new.driver_reviews Pk pk_driver_reviews ( id ) idid * int int driver_id ( driver_id ) driver_iddriver_id * int intReferences drivers ( driver_id -> id ) ratingrating * float(12,0) float(12,0) reviewreview * text text created_atcreated_at * datetime datetime updated_atupdated_at * datetime datetime driver_risk_scoresTable drivex_new.driver_risk_scores Pk pk_driver_risk_scores ( id ) idid * int int driver_id ( driver_id ) driver_iddriver_id * int intReferences drivers ( driver_id -> id ) added_by ( added_by ) added_byadded_by * int intReferences admin_users ( added_by -> id ) scorescore * int int created_atcreated_at datetime datetime updated_atupdated_at datetime datetime driver_verification_reviewsTable drivex_new.driver_verification_reviews Pk pk_driver_verification_reviews ( id ) idid * int int driver_id ( driver_id ) driver_iddriver_id * int intReferences drivers ( driver_id -> id ) suggestionsuggestion * varchar(255) varchar(255) reasonreason * text text created_atcreated_at datetime datetime updated_atupdated_at datetime datetime driversTable drivex_new.drivers Pk pk_drivers ( id ) idid * int intReferred by driver_reviews ( driver_id -> id ) Referred by driver_risk_scores ( driver_id -> id ) Referred by driver_verification_reviews ( driver_id -> id ) Referred by member_subscriptions ( driver_id -> id ) Referred by notifications ( user_id -> id ) Referred by user_certificates ( user_id -> id ) user_id ( user_id ) user_iduser_id * int intReferences users ( user_id -> id ) added_by ( added_by ) added_byadded_by * int intReferences admin_users ( added_by -> id ) References employers ( added_by -> id ) References insurance_companies ( added_by -> id ) dobdob * datetime datetime ageage * int int gendergender * int int state ( state ) statestate * int intReferences states ( state -> id ) lga ( lga ) lgalga * int intReferences lgas ( lga -> id ) addressaddress * varchar(255) varchar(255) passportpassport * varchar(255) varchar(255) identification ( identification ) identificationidentification * int intReferences document_types ( identification -> id ) license_nolicense_no * varchar(255) varchar(255) license_issued_datelicense_issued_date * datetime datetime license_expiry_datelicense_expiry_date * datetime datetime currently_employedcurrently_employed * int 1->Yes, 0->No int currently_employer_namecurrently_employer_name * varchar(255) varchar(255) currently_employer_emailcurrently_employer_email * varchar(255) varchar(255) currently_employer_phone_nocurrently_employer_phone_no * varchar(255) varchar(255) previous_employer_nameprevious_employer_name * varchar(255) varchar(255) previous_employer_emailprevious_employer_email * varchar(255) varchar(255) previous_employer_phone_noprevious_employer_phone_no * varchar(255) varchar(255) driver_experience_in_yeardriver_experience_in_year * int int drive_vehicledrive_vehicle * varchar(255) varchar(255) frequest_drive_timingfrequest_drive_timing * int 1->daily, 2->weekly,3->every two weeks, 4->monthly int is_approvedis_approved * int 0->No, 1->yes int approved_by ( approved_by ) approved_byapproved_by * int intReferences admin_users ( approved_by -> id ) employer_idemployer_id * varchar(255) varchar(255) created_atcreated_at datetime datetime updated_atupdated_at datetime datetime employersTable drivex_new.employers Pk pk_employers ( id ) idid * int intReferred by drivers ( added_by -> id ) Referred by notifications ( user_id -> id ) Referred by wallets ( employer_id -> id ) user_id ( user_id ) user_iduser_id * int intReferences users ( user_id -> id ) state ( state ) statestate * int intReferences states ( state -> id ) lga ( lga ) lgalga * int intReferences lgas ( lga -> id ) addressaddress * varchar(255) varchar(255) company_phone_nocompany_phone_no * varchar(255) varchar(255) industryindustry * varchar(255) varchar(255) full_addressfull_address * text text identification ( identification ) identificationidentification * int intReferences document_types ( identification -> id ) cac_registration_numbercac_registration_number * varchar(255) varchar(255) created_atcreated_at datetime datetime updated_atupdated_at datetime datetime insurance_companiesTable drivex_new.insurance_companies Pk pk_insurance_companies ( id ) idid * int intReferred by drivers ( added_by -> id ) Referred by notifications ( user_id -> id ) Referred by wallets ( insurance_id -> id ) user_id ( user_id ) user_iduser_id * int intReferences users ( user_id -> id ) full_addressfull_address * text text identification ( identification ) identificationidentification * int intReferences document_types ( identification -> id ) cac_registration_numbercac_registration_number * varchar(255) varchar(255) other_documentsother_documents * varchar(255) varchar(255) insurance_numberinsurance_number * varchar(255) varchar(255) created_atcreated_at * datetime datetime updated_atupdated_at * datetime datetime lgasTable drivex_new.lgas Pk pk_lgas ( id ) idid * int intReferred by drivers ( lga -> id ) Referred by employers ( lga -> id ) state_idstate_id int int lgalga varchar(255) varchar(255) createdcreated datetime datetime member_subscriptionsTable drivex_new.member_subscriptions idid * int int membership_idmembership_id * varchar(50) varchar(50) driver_id ( driver_id ) driver_iddriver_id * int intReferences drivers ( driver_id -> id ) package_id ( package_id ) package_idpackage_id * int intReferences subscription_package ( package_id -> id ) transaction_idtransaction_id * varchar(255) varchar(255) amountamount * double double payment_statuspayment_status * int int start_datestart_date * datetime datetime expiry_dateexpiry_date * datetime datetime craeted_atcraeted_at * datetime datetime updated_atupdated_at * datetime datetime messagesTable drivex_new.messages Pk pk_messages ( id ) idid * int int message_from ( message_from ) message_frommessage_from * int intReferences users ( message_from -> id ) message_to ( message_to ) message_tomessage_to * int intReferences users ( message_to -> id ) messagemessage text text created_atcreated_at * datetime datetime updated_atupdated_at * datetime datetime notificationsTable drivex_new.notifications Pk pk_notifications ( id ) idid * int int user_id ( user_id ) user_iduser_id * int intReferences drivers ( user_id -> id ) References employers ( user_id -> id ) References insurance_companies ( user_id -> id ) user_typeuser_type * int 1->Driver, 2->Employer, 3->Insurance Company int notification_textnotification_text * text text notification_fornotification_for * varchar(255) varchar(255) created_atcreated_at datetime datetime updated_atupdated_at datetime datetime sitesettingsTable drivex_new.sitesettings Pk pk_sitesettings ( id ) idid * int int site_emailsite_email varchar(150) varchar(150) sitelogo varchar(255) logo file path varchar(255) sitefaviconsitefavicon varchar(255) Favicon image path varchar(255) sitefooterlogo varchar(255) varchar(255) addressaddress longtext longtext phone_numberphone_number varchar(40) varchar(40) site_titlesite_title varchar(255) Site Title if not override varchar(255) created_atcreated_at datetime datetime updated_atupdated_at datetime datetime statesTable drivex_new.states Pk pk_states ( id ) idid * int intReferred by drivers ( state -> id ) Referred by employers ( state -> id ) statestate varchar(255) varchar(255) country_idcountry_id int int zonezone varchar(255) varchar(255) createdcreated datetime datetime subscription_packageTable drivex_new.subscription_package Pk pk_subscription_package ( id ) idid * int intReferred by member_subscriptions ( package_id -> id ) titletitle * varchar(255) varchar(255) priceprice * double double statusstatus * int int created_atcreated_at datetime datetime updated_atupdated_at datetime datetime transaction_historiesTable drivex_new.transaction_histories idid * int int transaction_fortransaction_for * varchar(40) varchar(40) transaction_idtransaction_id * varchar(250) varchar(250) amountamount * double double created_atcreated_at * datetime datetime updated_atupdated_at * datetime datetime user_certificatesTable drivex_new.user_certificates Pk pk_user_certificates ( id ) idid * int int user_id ( user_id ) user_iduser_id * int intReferences drivers ( user_id -> id ) certificatecertificate * varchar(255) varchar(255) created_atcreated_at datetime datetime updated_atupdated_at datetime datetime usersTable drivex_new.users Pk pk_users ( id ) idid * int intReferred by drivers ( user_id -> id ) Referred by employers ( user_id -> id ) Referred by insurance_companies ( user_id -> id ) Referred by messages ( message_from -> id ) Referred by messages ( message_to -> id ) user_typeuser_type * int 1-> Driver, 2-> Employer, 3-> Insurance Company int namename * varchar(255) varchar(255) middle_namemiddle_name varchar(255) varchar(255) last_namelast_name varchar(255) varchar(255) emailemail * varchar(255) varchar(255) phone_numberphone_number * varchar(255) varchar(255) passwordpassword * varchar(255) varchar(255) is_mail_confirmis_mail_confirm * int 1->Verified , 0->Not Verified. int statusstatus * int 0>In active, 1->active , 2->block, 3->leave int created_atcreated_at datetime datetime updated_atupdated_at datetime datetime wallet_transactionsTable drivex_new.wallet_transactions Pk pk_wallet_transactions ( id ) idid * int int wallet_id ( wallet_id ) wallet_idwallet_id * int intReferences wallets ( wallet_id -> id ) amountamount * double double transaction_idtransaction_id * varchar(255) varchar(255) created_atcreated_at * datetime datetime updated_atupdated_at * datetime datetime walletsTable drivex_new.wallets Pk pk_wallets ( id ) idid * int intReferred by wallet_transactions ( wallet_id -> id ) user_id ( insurance_id ) insurance_idinsurance_id * int intReferences insurance_companies ( insurance_id -> id ) employer_id ( employer_id ) employer_idemployer_id * int intReferences employers ( employer_id -> id ) balancebalance * double double created_atcreated_at datetime datetime updated_atupdated_at datetime datetime


Table activity_tracker
IdxField NameData TypeDescription
* id int AUTO_INCREMENT
* activity_done_by int user id
* activity_done_by_type int 1->Driver, 2->employer, 3->insurance_company
* activity_description text
* created_at datetime
* updated_at datetime
Indexes
pk_activity_tracker ON id


Table admin_users
IdxField NameData Type
* id int AUTO_INCREMENT
* full_name varchar(250)
  user_profile_img varchar(255)
* uname varchar(250)
* mail_id varchar(250)
* pass varchar(250)
* contact_no varchar(250)
* is_active int
  created_at datetime
  updated_at datetime
* admin_type varchar(255)
Indexes
pk_admin_users ON id


Table adminmenus
IdxField NameData TypeDescription
* id int AUTO_INCREMENT
* admin_id int
* menu_name varchar(100)
  menu_link text
  menu_type int DEFAULT 1 1 => Add, 2 => List
  select_parent int DEFAULT 0
  order_no int DEFAULT 0
  menu_class varchar(200)
  status int DEFAULT 1
  created_at datetime
  updated_at datetime
Indexes
pk_adminmenus ON id
admin_id ON admin_id
Foreign Keys
adminmenus_ibfk_1 ( admin_id ) ref admin_users (id)


Table assignmenus
IdxField NameData Type
* id int AUTO_INCREMENT
* admin_id int
* menuid varchar(200)
  facilities text
  created_at datetime
  updated_at datetime
Indexes
pk_assignmenus ON id
admin_id ON admin_id
Foreign Keys
assignmenus_ibfk_1 ( admin_id ) ref admin_users (id)


Table countries
IdxField NameData TypeDescription
* id int AUTO_INCREMENT
name varchar(250)
  status boolean DEFAULT true 1=active, 2=inactive
* created_date date
Indexes
pk_countries ON id
country_name ON name


Table document_types
IdxField NameData Type
* id int AUTO_INCREMENT
* type_name int
  created_at datetime
  updated_at datetime
Indexes
pk_document_types ON id


Table driver_reviews
IdxField NameData Type
* id int AUTO_INCREMENT
* driver_id int
* rating float(12,0)
* review text
* created_at datetime
* updated_at datetime
Indexes
pk_driver_reviews ON id
driver_id ON driver_id
Foreign Keys
driver_reviews_ibfk_1 ( driver_id ) ref drivers (id)


Table driver_risk_scores
IdxField NameData Type
* id int AUTO_INCREMENT
* driver_id int
* added_by int
* score int
  created_at datetime
  updated_at datetime
Indexes
pk_driver_risk_scores ON id
added_by ON added_by
driver_id ON driver_id
Foreign Keys
driver_risk_scores_ibfk_2 ( added_by ) ref admin_users (id)
driver_risk_scores_ibfk_1 ( driver_id ) ref drivers (id)


Table driver_verification_reviews
IdxField NameData Type
* id int AUTO_INCREMENT
* driver_id int
* suggestion varchar(255)
* reason text
  created_at datetime
  updated_at datetime
Indexes
pk_driver_verification_reviews ON id
driver_id ON driver_id
Foreign Keys
driver_verification_reviews_ibfk_1 ( driver_id ) ref drivers (id)


Table drivers
IdxField NameData TypeDescription
* id int AUTO_INCREMENT
* user_id int
* added_by int
* dob datetime
* age int
* gender int
* state int
* lga int
* address varchar(255)
* passport varchar(255)
* identification int
* license_no varchar(255)
* license_issued_date datetime
* license_expiry_date datetime
* currently_employed int 1->Yes, 0->No
* currently_employer_name varchar(255)
* currently_employer_email varchar(255)
* currently_employer_phone_no varchar(255)
* previous_employer_name varchar(255)
* previous_employer_email varchar(255)
* previous_employer_phone_no varchar(255)
* driver_experience_in_year int
* drive_vehicle varchar(255)
* frequest_drive_timing int 1->daily, 2->weekly,3->every two weeks, 4->monthly
* is_approved int 0->No, 1->yes
* approved_by int
* employer_id varchar(255)
  created_at datetime
  updated_at datetime
Indexes
pk_drivers ON id
added_by ON added_by
approved_by ON approved_by
identification ON identification
lga ON lga
state ON state
user_id ON user_id
Foreign Keys
drivers_ibfk_7 ( added_by ) ref admin_users (id)
drivers_ibfk_8 ( approved_by ) ref admin_users (id)
drivers_ibfk_4 ( identification ) ref document_types (id)
drivers_ibfk_5 ( added_by ) ref employers (id)
drivers_ibfk_6 ( added_by ) ref insurance_companies (id)
drivers_ibfk_3 ( lga ) ref lgas (id)
drivers_ibfk_2 ( state ) ref states (id)
drivers_ibfk_1 ( user_id ) ref users (id)


Table employers
IdxField NameData Type
* id int AUTO_INCREMENT
* user_id int
* state int
* lga int
* address varchar(255)
* company_phone_no varchar(255)
* industry varchar(255)
* full_address text
* identification int
* cac_registration_number varchar(255)
  created_at datetime
  updated_at datetime
Indexes
pk_employers ON id
identification ON identification
lga ON lga
state ON state
user_id ON user_id
Foreign Keys
employers_ibfk_4 ( identification ) ref document_types (id)
employers_ibfk_3 ( lga ) ref lgas (id)
employers_ibfk_2 ( state ) ref states (id)
employers_ibfk_1 ( user_id ) ref users (id)


Table insurance_companies
IdxField NameData Type
* id int AUTO_INCREMENT
* user_id int
* full_address text
* identification int
* cac_registration_number varchar(255)
* other_documents varchar(255)
* insurance_number varchar(255)
* created_at datetime
* updated_at datetime
Indexes
pk_insurance_companies ON id
identification ON identification
user_id ON user_id
Foreign Keys
insurance_companies_ibfk_2 ( identification ) ref document_types (id)
insurance_companies_ibfk_1 ( user_id ) ref users (id)


Table lgas
IdxField NameData Type
* id int AUTO_INCREMENT
  state_id int
  lga varchar(255)
  created datetime
Indexes
pk_lgas ON id


Table member_subscriptions
IdxField NameData Type
* id int
* membership_id varchar(50)
* driver_id int
* package_id int
* transaction_id varchar(255)
* amount double
* payment_status int
* start_date datetime
* expiry_date datetime
* craeted_at datetime
* updated_at datetime
Indexes
driver_id ON driver_id
package_id ON package_id
Foreign Keys
member_subscriptions_ibfk_1 ( driver_id ) ref drivers (id)
member_subscriptions_ibfk_2 ( package_id ) ref subscription_package (id)


Table messages
IdxField NameData Type
* id int AUTO_INCREMENT
* message_from int
* message_to int
  message text
* created_at datetime
* updated_at datetime
Indexes
pk_messages ON id
message_from ON message_from
message_to ON message_to
Foreign Keys
messages_ibfk_1 ( message_from ) ref users (id)
messages_ibfk_2 ( message_to ) ref users (id)


Table notifications
IdxField NameData TypeDescription
* id int AUTO_INCREMENT
* user_id int
* user_type int 1->Driver, 2->Employer, 3->Insurance Company
* notification_text text
* notification_for varchar(255)
  created_at datetime
  updated_at datetime
Indexes
pk_notifications ON id
user_id ON user_id
Foreign Keys
notifications_ibfk_1 ( user_id ) ref drivers (id)
notifications_ibfk_2 ( user_id ) ref employers (id)
notifications_ibfk_3 ( user_id ) ref insurance_companies (id)


Table sitesettings
IdxField NameData TypeDescription
* id int AUTO_INCREMENT
  site_email varchar(150)
  sitelogo varchar(255) logo file path
  sitefavicon varchar(255) Favicon image path
  sitefooterlogo varchar(255)
  address longtext
  phone_number varchar(40)
  site_title varchar(255) Site Title if not override
  created_at datetime
  updated_at datetime
Indexes
pk_sitesettings ON id


Table states
IdxField NameData Type
* id int AUTO_INCREMENT
  state varchar(255)
  country_id int
  zone varchar(255)
  created datetime
Indexes
pk_states ON id


Table subscription_package
IdxField NameData Type
* id int AUTO_INCREMENT
* title varchar(255)
* price double
* status int
  created_at datetime
  updated_at datetime
Indexes
pk_subscription_package ON id


Table transaction_histories
IdxField NameData Type
* id int
* transaction_for varchar(40)
* transaction_id varchar(250)
* amount double
* created_at datetime
* updated_at datetime


Table user_certificates
IdxField NameData Type
* id int AUTO_INCREMENT
* user_id int
* certificate varchar(255)
  created_at datetime
  updated_at datetime
Indexes
pk_user_certificates ON id
user_id ON user_id
Foreign Keys
user_certificates_ibfk_1 ( user_id ) ref drivers (id)


Table users
IdxField NameData TypeDescription
* id int AUTO_INCREMENT
* user_type int 1-> Driver, 2-> Employer, 3-> Insurance Company
* name varchar(255)
  middle_name varchar(255)
  last_name varchar(255)
* email varchar(255)
* phone_number varchar(255)
* password varchar(255)
* is_mail_confirm int 1->Verified , 0->Not Verified.
* status int 0>In active, 1->active , 2->block, 3->leave
  created_at datetime
  updated_at datetime
Indexes
pk_users ON id


Table wallet_transactions
IdxField NameData Type
* id int AUTO_INCREMENT
* wallet_id int
* amount double
* transaction_id varchar(255)
* created_at datetime
* updated_at datetime
Indexes
pk_wallet_transactions ON id
wallet_id ON wallet_id
Foreign Keys
wallet_transactions_ibfk_1 ( wallet_id ) ref wallets (id)


Table wallets
IdxField NameData Type
* id int AUTO_INCREMENT
* insurance_id int
* employer_id int
* balance double
  created_at datetime
  updated_at datetime
Indexes
pk_wallets ON id
employer_id ON employer_id
user_id ON insurance_id
Foreign Keys
wallets_ibfk_5 ( employer_id ) ref employers (id)
wallets_ibfk_4 ( insurance_id ) ref insurance_companies (id)