===Database emceqagn_ewusiwa

== Table structure for table admin_contact_settings

|------
|Column|Type|Null|Default
|------
|//**id**//|int(11)|No|
|phone|varchar(50)|Yes|NULL
|email|varchar(100)|Yes|NULL
|alert_via|enum(&#039;none&#039;, &#039;phone&#039;, &#039;email&#039;, &#039;both&#039;)|Yes|none
== Table structure for table hotspot_accounts

|------
|Column|Type|Null|Default
|------
|//**id**//|int(11)|No|
|**username**|varchar(100)|Yes|NULL
|password|varchar(250)|Yes|NULL
|account_name|varchar(100)|Yes|NULL
|enabled|varchar(50)|Yes|NULL
|profile|varchar(100)|Yes|NULL
|limit_uptime|varchar(50)|Yes|NULL
|limit_bytes_in|bigint(255)|Yes|NULL
|limit_bytes_out|bigint(255)|Yes|NULL
|limit_bytes_total|bigint(255)|Yes|NULL
|uptime|varchar(50)|Yes|NULL
|bytes_in|bigint(255)|Yes|NULL
|packets_in|bigint(255)|Yes|NULL
|bytes_out|bigint(255)|Yes|NULL
|packets_out|bigint(255)|Yes|NULL
|created_at|timestamp|No|current_timestamp()
|transaction_id|varchar(64)|Yes|NULL
== Table structure for table hotspot_packages

|------
|Column|Type|Null|Default
|------
|//**id**//|int(11)|No|
|profile|varchar(100)|No|
|amount|decimal(10,2)|No|
|commission|decimal(10,2)|Yes|NULL
|limit_uptime|varchar(255)|Yes|NULL
|limit_bytes_in|bigint(255)|Yes|NULL
|limit_bytes_out|bigint(255)|Yes|NULL
|limit_bytes_total|bigint(255)|Yes|NULL
|description|varchar(255)|Yes|NULL
|created_at|timestamp|Yes|current_timestamp()
== Table structure for table hotspot_profiles

|------
|Column|Type|Null|Default
|------
|//**id**//|int(11)|No|
|router_name|varchar(250)|Yes|NULL
|**name**|varchar(100)|Yes|NULL
|username_format|varchar(100)|Yes|NULL
|session_timeout|varchar(50)|Yes|NULL
|idle_timeout|varchar(50)|Yes|NULL
|shared_users|int(11)|Yes|NULL
|rate_limit|varchar(50)|Yes|NULL
|status_refresh|varchar(50)|Yes|NULL
|mac_cookie_timeout|varchar(50)|Yes|NULL
|created_at|timestamp|Yes|current_timestamp()
== Table structure for table hotspot_users

|------
|Column|Type|Null|Default
|------
|//**id**//|int(11)|No|
|router_name|varchar(250)|Yes|NULL
|**username**|varchar(100)|No|
|password|varchar(100)|Yes|NULL
|profile|varchar(100)|Yes|NULL
|uptime|varchar(50)|Yes|NULL
|bytes_in|varchar(255)|Yes|NULL
|bytes_out|varchar(255)|Yes|NULL
|total_bandwidth_gb|varchar(255)|Yes|NULL
|mac_address|varchar(255)|Yes|NULL
|server|varchar(255)|Yes|NULL
|disabled|tinyint(1)|Yes|0
|comment|varchar(255)|Yes|NULL
|limit_uptime|varchar(50)|Yes|NULL
|limit_bytes_in|varchar(255)|Yes|NULL
|limit_bytes_out|varchar(255)|Yes|NULL
|limit_bytes_total|varchar(255)|Yes|NULL
|rate_limit|varchar(50)|Yes|NULL
|created_at|timestamp|Yes|current_timestamp()
== Table structure for table hotspot_users_history

|------
|Column|Type|Null|Default
|------
|//**id**//|int(11)|No|
|username|varchar(100)|No|
|password|varchar(100)|Yes|NULL
|profile|varchar(100)|Yes|NULL
|uptime|varchar(50)|Yes|NULL
|bytes_in|varchar(255)|Yes|NULL
|bytes_out|varchar(255)|Yes|NULL
|total_bandwidth_gb|varchar(255)|Yes|NULL
|mac_address|varchar(255)|Yes|NULL
|server|varchar(255)|Yes|NULL
|disabled|tinyint(1)|Yes|0
|comment|varchar(255)|Yes|NULL
|limit_uptime|varchar(50)|Yes|NULL
|limit_bytes_in|varchar(255)|Yes|NULL
|limit_bytes_out|varchar(255)|Yes|NULL
|limit_bytes_total|varchar(255)|Yes|NULL
|rate_limit|varchar(50)|Yes|NULL
|created_at|timestamp|Yes|current_timestamp()
== Table structure for table managers

|------
|Column|Type|Null|Default
|------
|//**id**//|int(11)|No|
|unit|varchar(20)|No|
|name|varchar(100)|No|
|phone|varchar(20)|Yes|NULL
|description|varchar(255)|Yes|NULL
|username|varchar(50)|No|
|password_hash|varchar(255)|No|
|created_at|datetime|Yes|current_timestamp()
== Table structure for table message_templates

|------
|Column|Type|Null|Default
|------
|//**recipient**//|varchar(20)|No|
|content|text|No|
== Table structure for table mikrotik_commands

|------
|Column|Type|Null|Default
|------
|//**id**//|int(11)|No|
|command|text|Yes|NULL
|router_id|varchar(50)|Yes|NULL
|router_cctu|varchar(50)|No|pending
|created_at|datetime|Yes|current_timestamp()
|executed_at|datetime|Yes|NULL
== Table structure for table mikrotik_users

|------
|Column|Type|Null|Default
|------
|//**id**//|int(11)|No|
|name|varchar(100)|Yes|NULL
|enabled|tinyint(1)|Yes|NULL
|profile|varchar(100)|Yes|NULL
|limit_uptime|varchar(50)|Yes|NULL
|limit_bytes_in|bigint(20)|Yes|NULL
|limit_bytes_out|bigint(20)|Yes|NULL
|limit_bytes_total|bigint(20)|Yes|NULL
|uptime|varchar(50)|Yes|NULL
|bytes_in|bigint(20)|Yes|NULL
|packets_in|bigint(20)|Yes|NULL
|bytes_out|bigint(20)|Yes|NULL
|packets_out|bigint(20)|Yes|NULL
|created_at|timestamp|Yes|current_timestamp()
== Table structure for table payout_accounts

|------
|Column|Type|Null|Default
|------
|//**id**//|int(11)|No|
|account_type|enum(&#039;Mobile Money&#039;, &#039;Bank Account&#039;)|No|Mobile Money
|network_type|enum(&#039;MTN&#039;, &#039;VOD&#039;)|No|
|account_number|varchar(20)|No|
|account_name|varchar(128)|No|
|is_verified|tinyint(1)|No|0
|created_at|datetime|Yes|current_timestamp()
|updated_at|datetime|Yes|current_timestamp()
== Table structure for table sent_sms_logs

|------
|Column|Type|Null|Default
|------
|//**id**//|int(11)|No|
|recipient|varchar(32)|No|
|message_content|text|No|
|response_code|int(11)|No|
|rate|decimal(10,4)|Yes|NULL
|message_id|varchar(64)|Yes|NULL
|status|int(11)|Yes|NULL
|status_description|varchar(255)|Yes|NULL
|network_id|varchar(64)|Yes|NULL
|raw_response|text|No|
|sent_at|datetime|Yes|current_timestamp()
== Table structure for table sms_templates

|------
|Column|Type|Null|Default
|------
|//**id**//|int(11)|No|
|template_name|varchar(255)|No|
|message_body|text|No|
|created_at|timestamp|Yes|current_timestamp()
== Table structure for table transaction_history

|------
|Column|Type|Null|Default
|------
|//**id**//|int(11)|No|
|username|varchar(100)|No|
|momo_number|varchar(50)|Yes|NULL
|network|varchar(50)|Yes|NULL
|buyer|varchar(50)|Yes|NULL
|transaction_id|varchar(100)|Yes|NULL
|amount|decimal(10,2)|Yes|NULL
|commission|decimal(10,2)|Yes|NULL
|profile|varchar(100)|Yes|NULL
|limit_uptime|varchar(50)|Yes|NULL
|limit_bytes_in|bigint(20)|Yes|NULL
|limit_bytes_out|bigint(20)|Yes|NULL
|limit_bytes_total|bigint(20)|Yes|NULL
|status|varchar(50)|Yes|NULL
|source|varchar(100)|Yes|NULL
|router|varchar(250)|Yes|NULL
|created_at|timestamp|Yes|current_timestamp()
|account_name|varchar(128)|Yes|NULL
== Table structure for table users

|------
|Column|Type|Null|Default
|------
|//**id**//|int(11)|No|
|**phone_number**|varchar(20)|No|
|email|varchar(100)|Yes|NULL|UNIQUE
|password|varchar(255)|No|
|otp_code|varchar(6)|Yes|NULL
|otp_expiry|datetime|Yes|NULL
|created_at|datetime|No|current_timestamp()
|profile_name|varchar(250)|Yes|NULL
|username|varchar(250)|Yes|NULL
== Table structure for table user_sessions

|------
|Column|Type|Null|Default
|------
|//**id**//|int(11)|No|
|**username**|varchar(100)|No|
|bytes_rx|bigint(20)|No|
|bytes_tx|bigint(20)|No|
|router_time|timestamp|No|current_timestamp()
