قم إفلات الملفات هنا

SQL upload ( 0 ) x -

الإعدادات المتعلقة بالصفحة انقر على الشريط للتمرير إلى أعلى الصفحة
Press Ctrl+Enter to execute query Press Enter to execute query
ascending
descending
Order:
تصحيح SQL
Count
Execution order
Time taken
Order by:
Group queries
Ungroup queries
Collapse Expand Show trace Hide trace Count : Time taken :
Bookmarks
تحديث
إضافة
لا توجد إشارات مرجعية
إضافة للمفضلة
خيارات
Set default





Collapse Expand Requery تعديل Explain جانبي Bookmark Query failed قاعدة البيانات : Queried time :
بدون عنوان *
v Show/Hide tables list View in fullscreen اضافة جداول من قواعد بيانات اخري New page فتح الصفحة احفظ الصفحة حفظ الصفحة في صيغة Delete pages أنشئ الجدول Create relationship اختر الحقل لإظهاره Reload مساعدة Angular links / Direct links Snap to grid v Small/Big All Toggle small/big Toggle relationship lines Export schema > نقل القائمة > Pin text
عدد الجداول: 0
v smartpos_ayla_pos audit_logs
* id : bigint(20) unsigned
* user_id : int(10) unsigned
* action : varchar(80)
* entity : varchar(80)
* entity_id : bigint(20) unsigned
* ip : varchar(64)
* meta_json : longtext
* created_at : timestamp
v smartpos_ayla_pos categories
* id : int(10) unsigned
* name : varchar(120)
* image : varchar(255)
* sort_order : int(11)
* active : tinyint(1)
v smartpos_ayla_pos employees
* id : int(10) unsigned
* employee_no : varchar(30)
* name : varchar(140)
* phone : varchar(40)
* job_title : varchar(100)
* hire_date : date
* salary_type : enum('monthly','daily')
* base_salary : decimal(14,2)
* active : tinyint(1)
* note : varchar(255)
* created_at : timestamp
v smartpos_ayla_pos employee_advances
* id : bigint(20) unsigned
* employee_id : int(10) unsigned
* user_id : int(10) unsigned
* shift_id : bigint(20) unsigned
* amount : decimal(14,2)
* remaining_amount : decimal(14,2)
* advance_date : date
* payment_method : enum('cash','card','bank')
* fund_source : enum('shift_drawer','treasury','external')
* note : varchar(255)
* created_at : datetime
v smartpos_ayla_pos expenses
* id : bigint(20) unsigned
* user_id : int(10) unsigned
* shift_id : bigint(20) unsigned
* title : varchar(180)
* amount : decimal(14,2)
* expense_date : date
* payment_method : enum('cash','card','bank')
* fund_source : enum('shift_drawer','treasury','external')
* expense_category : varchar(40)
* note : text
* created_at : datetime
v smartpos_ayla_pos notes
* id : bigint(20) unsigned
* user_id : int(10) unsigned
* title : varchar(180)
* body : text
* created_at : datetime
* updated_at : datetime
v smartpos_ayla_pos opening_capital_allocations
* id : bigint(20) unsigned
* total_amount : decimal(14,2)
* partners_total_percent : decimal(7,4)
* store_share_percent : decimal(7,4)
* store_amount : decimal(14,2)
* created_by : int(10) unsigned
* created_at : datetime
* note : varchar(255)
v smartpos_ayla_pos opening_capital_allocation_items
* id : bigint(20) unsigned
* allocation_id : bigint(20) unsigned
* partner_id : int(10) unsigned
* partner_name : varchar(160)
* share_percent : decimal(7,4)
* amount : decimal(14,2)
v smartpos_ayla_pos orders
* id : bigint(20) unsigned
* order_no : varchar(40)
* user_id : int(10) unsigned
* shift_id : bigint(20) unsigned
* waiter_user_id : int(10) unsigned
* table_id : int(10) unsigned
* order_type : enum('takeaway','dinein')
* payment_method : enum('cash','card','mixed')
* subtotal : decimal(14,2)
* discount : decimal(14,2)
* total : decimal(14,2)
* cogs : decimal(14,4)
* gross_profit : decimal(14,4)
* status : enum('open','completed','cancelled')
* note : varchar(500)
* created_at : datetime
* completed_at : datetime
v smartpos_ayla_pos order_items
* id : bigint(20) unsigned
* order_id : bigint(20) unsigned
* product_id : int(10) unsigned
* product_name : varchar(160)
* variant_id : int(10) unsigned
* variant_name : varchar(80)
* qty : decimal(14,3)
* unit_price : decimal(14,2)
* line_gross : decimal(14,2)
* discount_allocated : decimal(14,4)
* line_net : decimal(14,4)
* unit_cost_snapshot : decimal(14,4)
* line_cogs : decimal(14,4)
* line_profit : decimal(14,4)
* unit_cost : decimal(12,3)
v smartpos_ayla_pos partners
* id : int(10) unsigned
* name : varchar(160)
* share_percent : decimal(7,4)
* active : tinyint(1)
* note : varchar(255)
* created_at : timestamp
* updated_at : timestamp
v smartpos_ayla_pos partner_advances
* id : bigint(20) unsigned
* partner_id : int(10) unsigned
* amount : decimal(14,2)
* remaining : decimal(14,2)
* advance_date : date
* note : varchar(255)
* status : enum('open','settled','cancelled')
* created_by : int(10) unsigned
* created_at : datetime
* updated_at : datetime
v smartpos_ayla_pos partner_advance_settlements
* id : bigint(20) unsigned
* advance_id : bigint(20) unsigned
* distribution_id : bigint(20) unsigned
* partner_id : int(10) unsigned
* amount : decimal(14,2)
* created_at : datetime
v smartpos_ayla_pos partner_distributions
* id : bigint(20) unsigned
* period_month : char(7)
* net_profit : decimal(14,2)
* distributable_profit : decimal(14,2)
* partners_total_percent : decimal(7,4)
* store_share_percent : decimal(7,4)
* store_amount : decimal(14,2)
* created_by : int(10) unsigned
* created_at : datetime
v smartpos_ayla_pos partner_distribution_items
* id : bigint(20) unsigned
* distribution_id : bigint(20) unsigned
* partner_id : int(10) unsigned
* partner_name : varchar(160)
* share_percent : decimal(7,4)
* amount : decimal(14,2)
* advance_before : decimal(14,2)
* advance_deducted : decimal(14,2)
* net_amount : decimal(14,2)
* advance_after : decimal(14,2)
v smartpos_ayla_pos partner_wallets
* partner_id : int(10) unsigned
* balance : decimal(14,2)
* updated_at : datetime
v smartpos_ayla_pos partner_wallet_transactions
* id : bigint(20) unsigned
* partner_id : int(10) unsigned
* user_id : int(10) unsigned
* type : enum('opening_share','profit_share','payout','adjustment')
* direction : enum('in','out')
* amount : decimal(14,2)
* balance_before : decimal(14,2)
* balance_after : decimal(14,2)
* reference_type : varchar(40)
* reference_id : bigint(20) unsigned
* note : varchar(255)
* created_at : datetime
v smartpos_ayla_pos payments
* id : bigint(20) unsigned
* order_id : bigint(20) unsigned
* method : enum('cash','card')
* amount : decimal(14,2)
* created_at : datetime
v smartpos_ayla_pos payrolls
* id : bigint(20) unsigned
* employee_id : int(10) unsigned
* user_id : int(10) unsigned
* shift_id : bigint(20) unsigned
* payroll_date : date
* period_label : varchar(80)
* gross_salary : decimal(14,2)
* bonuses : decimal(14,2)
* deductions : decimal(14,2)
* advance_deduction : decimal(14,2)
* salary_expense : decimal(14,2)
* net_paid : decimal(14,2)
* payment_method : enum('cash','card','bank')
* note : varchar(255)
* created_at : datetime
v smartpos_ayla_pos printers
* id : int(10) unsigned
* name : varchar(120)
* printer_type : enum('thermal','office')
* connection_type : enum('windows_share','bluetooth','browser')
* host : varchar(120)
* share_name : varchar(120)
* paper_width : enum('58','80')
* is_default : tinyint(1)
* active : tinyint(1)
* created_at : timestamp
* updated_at : timestamp
v smartpos_ayla_pos products
* id : int(10) unsigned
* category_id : int(10) unsigned
* name : varchar(160)
* barcode : varchar(80)
* scale_code : varchar(20)
* sale_mode : enum('unit','weight')
* unit_label : varchar(20)
* price : decimal(12,3)
* avg_cost : decimal(14,4)
* stock_qty : decimal(14,3)
* min_stock_qty : decimal(14,3)
* track_stock : tinyint(1)
* active : tinyint(1)
* image : varchar(255)
* has_variants : tinyint(1)
* created_at : timestamp
* cost : decimal(12,3)
v smartpos_ayla_pos product_variants
* id : int(10) unsigned
* product_id : int(10) unsigned
* name : varchar(80)
* barcode : varchar(80)
* price : decimal(14,2)
* cost : decimal(14,4)
* sort_order : int(11)
* active : tinyint(1)
* created_at : timestamp
* is_active : tinyint(1)
v smartpos_ayla_pos purchases
* id : bigint(20) unsigned
* product_id : int(10) unsigned
* user_id : int(10) unsigned
* shift_id : bigint(20) unsigned
* supplier : varchar(160)
* qty : decimal(14,3)
* unit_cost : decimal(14,4)
* total : decimal(14,2)
* old_avg_cost : decimal(14,4)
* new_avg_cost : decimal(14,4)
* payment_method : enum('cash','card','bank')
* created_at : datetime
v smartpos_ayla_pos refunds
* id : bigint(20) unsigned
* order_id : bigint(20) unsigned
* user_id : int(10) unsigned
* shift_id : bigint(20) unsigned
* amount : decimal(14,2)
* cogs_reversed : decimal(14,4)
* reason : varchar(255)
* created_at : datetime
v smartpos_ayla_pos refund_payments
* id : bigint(20) unsigned
* refund_id : bigint(20) unsigned
* method : enum('cash','card')
* amount : decimal(14,2)
* created_at : datetime
v smartpos_ayla_pos settings
* key : varchar(100)
* value : text
v smartpos_ayla_pos shifts
* id : bigint(20) unsigned
* user_id : int(10) unsigned
* opening_cash : decimal(14,2)
* closing_cash : decimal(14,2)
* expected_cash : decimal(14,2)
* cash_difference : decimal(14,2)
* opening_from_treasury : decimal(14,2)
* closing_to_treasury : decimal(14,2)
* opened_at : datetime
* closed_at : datetime
* status : enum('open','closed')
* note : varchar(255)
v smartpos_ayla_pos stock_movements
* id : bigint(20) unsigned
* product_id : int(10) unsigned
* user_id : int(10) unsigned
* type : varchar(30)
* qty : decimal(14,3)
* balance_after : decimal(14,3)
* unit_cost : decimal(14,4)
* reference_type : varchar(30)
* reference_id : bigint(20) unsigned
* note : varchar(255)
* created_at : datetime
v smartpos_ayla_pos store_fund_account
* id : tinyint(3) unsigned
* balance : decimal(14,2)
* updated_at : datetime
v smartpos_ayla_pos store_fund_transactions
* id : bigint(20) unsigned
* user_id : int(10) unsigned
* type : enum('opening_share','profit_share','development','adjustment')
* direction : enum('in','out')
* amount : decimal(14,2)
* balance_before : decimal(14,2)
* balance_after : decimal(14,2)
* reference_type : varchar(40)
* reference_id : bigint(20) unsigned
* note : varchar(255)
* created_at : datetime
v smartpos_ayla_pos store_tables
* id : int(10) unsigned
* table_number : varchar(30)
* table_name : varchar(100)
* active : tinyint(1)
* sort_order : int(11)
* created_at : timestamp
* updated_at : timestamp
v smartpos_ayla_pos suppliers
* id : int(10) unsigned
* name : varchar(160)
* phone : varchar(50)
* address : varchar(255)
* tax_number : varchar(80)
* note : text
* active : tinyint(1)
* created_at : timestamp
* updated_at : timestamp
v smartpos_ayla_pos supplier_checks
* id : bigint(20) unsigned
* supplier_id : int(10) unsigned
* invoice_id : bigint(20) unsigned
* user_id : int(10) unsigned
* check_source : enum('personal','customer')
* customer_name : varchar(160)
* check_no : varchar(100)
* bank_name : varchar(120)
* amount : decimal(14,2)
* issue_date : date
* due_date : date
* status : enum('pending','cleared','returned','cancelled')
* cleared_date : date
* note : varchar(255)
* created_at : datetime
v smartpos_ayla_pos supplier_installments
* id : bigint(20) unsigned
* supplier_id : int(10) unsigned
* invoice_id : bigint(20) unsigned
* amount : decimal(14,2)
* due_date : date
* status : enum('pending','paid','cancelled')
* paid_payment_id : bigint(20) unsigned
* note : varchar(255)
* created_at : datetime
* paid_at : datetime
v smartpos_ayla_pos supplier_invoices
* id : bigint(20) unsigned
* supplier_id : int(10) unsigned
* user_id : int(10) unsigned
* invoice_no : varchar(80)
* invoice_date : date
* total : decimal(14,2)
* payment_plan : enum('cash','checks','mixed','credit')
* note : text
* created_at : datetime
v smartpos_ayla_pos supplier_invoice_items
* id : bigint(20) unsigned
* invoice_id : bigint(20) unsigned
* product_id : int(10) unsigned
* product_name : varchar(180)
* qty : decimal(14,3)
* unit_cost : decimal(14,4)
* line_total : decimal(14,2)
* old_avg_cost : decimal(14,4)
* new_avg_cost : decimal(14,4)
v smartpos_ayla_pos supplier_payments
* id : bigint(20) unsigned
* supplier_id : int(10) unsigned
* invoice_id : bigint(20) unsigned
* user_id : int(10) unsigned
* shift_id : bigint(20) unsigned
* amount : decimal(14,2)
* payment_date : date
* method : enum('cash','bank')
* fund_source : enum('shift_drawer','treasury','external')
* note : varchar(255)
* created_at : datetime
v smartpos_ayla_pos treasury_accounts
* id : tinyint(3) unsigned
* name : varchar(120)
* initial_balance : decimal(14,2)
* balance : decimal(14,2)
* initialized_at : datetime
* initialized_by : int(10) unsigned
* updated_at : timestamp
v smartpos_ayla_pos treasury_transactions
* id : bigint(20) unsigned
* treasury_id : tinyint(3) unsigned
* user_id : int(10) unsigned
* shift_id : bigint(20) unsigned
* expense_id : bigint(20) unsigned
* type : enum('initial','shift_open','shift_close','expense','employee_advance','supplier_payment','manual_deposit','manual_withdrawal','adjustment','reset')
* direction : enum('in','out')
* amount : decimal(14,2)
* balance_before : decimal(14,2)
* balance_after : decimal(14,2)
* reference_type : varchar(40)
* reference_id : bigint(20) unsigned
* note : varchar(255)
* created_at : datetime
v smartpos_ayla_pos update_history
* id : bigint(20) unsigned
* version : varchar(40)
* release_notes : text
* installed_by : bigint(20) unsigned
* installed_at : datetime
* backup_file : varchar(255)
v smartpos_ayla_pos users
* id : int(10) unsigned
* name : varchar(120)
* username : varchar(80)
* password_hash : varchar(255)
* role : enum('admin','cashier','waiter')
* active : tinyint(1)
* created_at : timestamp
v smartpos_ayla_pos waste
* id : bigint(20) unsigned
* product_id : int(10) unsigned
* user_id : int(10) unsigned
* shift_id : bigint(20) unsigned
* qty : decimal(14,3)
* unit_cost : decimal(14,4)
* cost_loss : decimal(14,4)
* waste_date : date
* reason : varchar(255)
* created_at : datetime
Create relationship
FOREIGN KEY
on delete
on update
Delete relationship