diff --git a/core/__pycache__/models.cpython-311.pyc b/core/__pycache__/models.cpython-311.pyc index 2186e8d..b8ccc01 100644 Binary files a/core/__pycache__/models.cpython-311.pyc and b/core/__pycache__/models.cpython-311.pyc differ diff --git a/core/__pycache__/urls.cpython-311.pyc b/core/__pycache__/urls.cpython-311.pyc index 94a8e37..accc30c 100644 Binary files a/core/__pycache__/urls.cpython-311.pyc and b/core/__pycache__/urls.cpython-311.pyc differ diff --git a/core/__pycache__/views.cpython-311.pyc b/core/__pycache__/views.cpython-311.pyc index 828f7d8..da16869 100644 Binary files a/core/__pycache__/views.cpython-311.pyc and b/core/__pycache__/views.cpython-311.pyc differ diff --git a/core/migrations/0035_remove_heldsale_customer_remove_heldsale_notes_and_more.py b/core/migrations/0035_remove_heldsale_customer_remove_heldsale_notes_and_more.py new file mode 100644 index 0000000..75696f1 --- /dev/null +++ b/core/migrations/0035_remove_heldsale_customer_remove_heldsale_notes_and_more.py @@ -0,0 +1,50 @@ +# Generated by Django 5.2.7 on 2026-02-11 08:39 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('core', '0034_systemsetting_favicon'), + ] + + operations = [ + migrations.RemoveField( + model_name='heldsale', + name='customer', + ), + migrations.RemoveField( + model_name='heldsale', + name='notes', + ), + migrations.RemoveField( + model_name='heldsale', + name='total_amount', + ), + migrations.AddField( + model_name='heldsale', + name='customer_name', + field=models.CharField(blank=True, max_length=200, verbose_name='Customer Name'), + ), + migrations.AddField( + model_name='heldsale', + name='note', + field=models.TextField(blank=True, verbose_name='Note'), + ), + migrations.AlterField( + model_name='customer', + name='phone', + field=models.CharField(blank=True, default='968', max_length=20, verbose_name='Phone'), + ), + migrations.AlterField( + model_name='heldsale', + name='cart_data', + field=models.TextField(verbose_name='Cart Data'), + ), + migrations.AlterField( + model_name='supplier', + name='phone', + field=models.CharField(blank=True, default='968', max_length=20, verbose_name='Phone'), + ), + ] diff --git a/core/migrations/__pycache__/0035_remove_heldsale_customer_remove_heldsale_notes_and_more.cpython-311.pyc b/core/migrations/__pycache__/0035_remove_heldsale_customer_remove_heldsale_notes_and_more.cpython-311.pyc new file mode 100644 index 0000000..43d20d4 Binary files /dev/null and b/core/migrations/__pycache__/0035_remove_heldsale_customer_remove_heldsale_notes_and_more.cpython-311.pyc differ diff --git a/core/models.py b/core/models.py index 9cf3601..eacc4a3 100644 --- a/core/models.py +++ b/core/models.py @@ -61,7 +61,7 @@ class LoyaltyTier(models.Model): class Customer(models.Model): name = models.CharField(_("Name"), max_length=200) - phone = models.CharField(_("Phone"), max_length=20, blank=True) + phone = models.CharField(_("Phone"), max_length=20, blank=True, default='968') email = models.EmailField(_("Email"), blank=True) address = models.TextField(_("Address"), blank=True) loyalty_points = models.DecimalField(_("Loyalty Points"), max_digits=15, decimal_places=2, default=0) @@ -96,7 +96,7 @@ class LoyaltyTransaction(models.Model): class Supplier(models.Model): name = models.CharField(_("Name"), max_length=200) contact_person = models.CharField(_("Contact Person"), max_length=200, blank=True) - phone = models.CharField(_("Phone"), max_length=20, blank=True) + phone = models.CharField(_("Phone"), max_length=20, blank=True, default='968') # created_at = models.DateTimeField(auto_now_add=True) <-- Removed to fix DB mismatch def __str__(self): diff --git a/core/templates/core/index.html b/core/templates/core/index.html index 93284a7..ae8dacc 100644 --- a/core/templates/core/index.html +++ b/core/templates/core/index.html @@ -12,9 +12,6 @@

{% trans "Welcome back! Here's what's happening with your business today." %}

- - {% trans "Fix Database" %} - {% trans "New Sale" %} diff --git a/core/templates/core/invoice_detail.html b/core/templates/core/invoice_detail.html index d94a7bc..596146c 100644 --- a/core/templates/core/invoice_detail.html +++ b/core/templates/core/invoice_detail.html @@ -21,7 +21,7 @@
{% endif %} - {% endif %} - + +
+
+
+ +
+ + + + + +
+ + Sign in + +
+ + Appearance settings + + + +
+ +
+
+ + +
+
+ + + + + + +
+
+ + + +
+ + + + +
+ + + + + +
+ +

Search code, repositories, users, issues, pull requests...

+
+ +
+
+ +
+
+
+ +
+ + + +
+
+
+

+ Provide feedback +

+ +
+
+ +
+
+ +
+ +
+

We read every piece of feedback, and take your input very seriously.

+ + + +
+
+ +
+ + + + + +
+
+
+

+ Saved searches +

+

Use saved searches to filter your results more quickly

+
+
+ +
+
+ +
+ +
+ + + +
+
+
+ +
+
+ +
+
+
+
+ + + + + + +
+ + Appearance settings + + + +
+ + +
+
+
+
+ + + + + +
+ + + + + + + + +
+ + + + + +
+ + + + + + + + + +
+
+ + + +
+
+ +
+
+ 404 “This is not the web page you are looking for” + + + + + + + + + + + + +
+
+ +
+
+ +
+ + +
+
+ +
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + diff --git a/static/fonts/Cairo-Regular.ttf b/static/fonts/Cairo-Regular.ttf new file mode 100644 index 0000000..70e0122 --- /dev/null +++ b/static/fonts/Cairo-Regular.ttf @@ -0,0 +1,1449 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Page not found · GitHub · GitHub + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + +
+ Skip to content + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + +
+ + + + + +
+ + + + + + + + + +
+
+ + + +
+
+ +
+
+ 404 “This is not the web page you are looking for” + + + + + + + + + + + + +
+
+ +
+
+ +
+ + +
+
+ +
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + diff --git a/staticfiles/fonts/Cairo-Bold.ttf b/staticfiles/fonts/Cairo-Bold.ttf new file mode 100644 index 0000000..3c9cf78 --- /dev/null +++ b/staticfiles/fonts/Cairo-Bold.ttf @@ -0,0 +1,1449 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Page not found · GitHub · GitHub + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + +
+ Skip to content + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + +
+ + + + + +
+ + + + + + + + + +
+
+ + + +
+
+ +
+
+ 404 “This is not the web page you are looking for” + + + + + + + + + + + + +
+
+ +
+
+ +
+ + +
+
+ +
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + diff --git a/staticfiles/fonts/Cairo-Regular.ttf b/staticfiles/fonts/Cairo-Regular.ttf new file mode 100644 index 0000000..70e0122 --- /dev/null +++ b/staticfiles/fonts/Cairo-Regular.ttf @@ -0,0 +1,1449 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Page not found · GitHub · GitHub + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + +
+ Skip to content + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + +
+ + + + + +
+ + + + + + + + + +
+
+ + + +
+
+ +
+
+ 404 “This is not the web page you are looking for” + + + + + + + + + + + + +
+
+ +
+
+ +
+ + +
+
+ +
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + diff --git a/tmp/backup_app_38086_20260211_094244.sql b/tmp/backup_app_38086_20260211_094244.sql new file mode 100644 index 0000000..962ddce --- /dev/null +++ b/tmp/backup_app_38086_20260211_094244.sql @@ -0,0 +1,2117 @@ +/*M!999999\- enable the sandbox mode */ +-- MariaDB dump 10.19 Distrib 10.11.14-MariaDB, for debian-linux-gnu (x86_64) +-- +-- Host: 127.0.0.1 Database: app_38086 +-- ------------------------------------------------------ +-- Server version 10.11.14-MariaDB-0+deb12u2 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8mb4 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `accounting_account` +-- + +DROP TABLE IF EXISTS `accounting_account`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `accounting_account` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `code` varchar(20) NOT NULL, + `name_en` varchar(100) NOT NULL, + `name_ar` varchar(100) NOT NULL, + `account_type` varchar(20) NOT NULL, + `description` longtext NOT NULL, + `is_active` tinyint(1) NOT NULL, + `created_at` datetime(6) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `code` (`code`) +) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `accounting_account` +-- + +LOCK TABLES `accounting_account` WRITE; +/*!40000 ALTER TABLE `accounting_account` DISABLE KEYS */; +INSERT INTO `accounting_account` VALUES +(1,'1000','Cash','النقد','asset','',1,'2026-02-03 03:14:30.097215'), +(2,'1010','Bank','البنك','asset','',1,'2026-02-03 03:14:30.101766'), +(3,'1200','Accounts Receivable','الذمم المدينة','asset','',1,'2026-02-03 03:14:30.107193'), +(4,'1300','Inventory','المخزون','asset','',1,'2026-02-03 03:14:30.110624'), +(5,'2000','Accounts Payable','الذمم الدائنة','liability','',1,'2026-02-03 03:14:30.113593'), +(6,'2100','VAT Payable','ضريبة القيمة المضافة المستحقة','liability','',1,'2026-02-03 03:14:30.116650'), +(7,'3000','Owner Equity','رأس المال','equity','',1,'2026-02-03 03:14:30.120693'), +(8,'3100','Retained Earnings','الأرباح المحتجزة','equity','',1,'2026-02-03 03:14:30.123663'), +(9,'4000','Sales Revenue','إيرادات المبيعات','income','',1,'2026-02-03 03:14:30.126764'), +(10,'4100','Other Income','إيرادات أخرى','income','',1,'2026-02-03 03:14:30.130098'), +(11,'5000','Cost of Goods Sold','تكلفة البضائع المباعة','expense','',1,'2026-02-03 03:14:30.133441'), +(12,'5100','Salaries Expense','مصاريف الرواتب','expense','',1,'2026-02-03 03:14:30.137720'), +(13,'5200','Rent Expense','مصاريف الإيجار','expense','',1,'2026-02-03 03:14:30.142674'), +(14,'5300','Utility Expense','مصاريف المرافق','expense','',1,'2026-02-03 03:14:30.147768'), +(15,'5400','General Expense','مصاريف عامة','expense','',1,'2026-02-03 03:14:30.150873'); +/*!40000 ALTER TABLE `accounting_account` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `accounting_journalentry` +-- + +DROP TABLE IF EXISTS `accounting_journalentry`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `accounting_journalentry` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date` date NOT NULL, + `description` longtext NOT NULL, + `reference` varchar(100) NOT NULL, + `object_id` int(10) unsigned DEFAULT NULL CHECK (`object_id` >= 0), + `created_at` datetime(6) NOT NULL, + `content_type_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `accounting_journalen_content_type_id_93a0cf24_fk_django_co` (`content_type_id`), + CONSTRAINT `accounting_journalen_content_type_id_93a0cf24_fk_django_co` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=38 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `accounting_journalentry` +-- + +LOCK TABLES `accounting_journalentry` WRITE; +/*!40000 ALTER TABLE `accounting_journalentry` DISABLE KEYS */; +INSERT INTO `accounting_journalentry` VALUES +(2,'2026-02-03','Sale Invoice #17','Sale #17',17,'2026-02-03 04:16:49.397681',8), +(4,'2026-02-03','Purchase Invoice #2','Purchase #2',2,'2026-02-03 04:17:33.077799',12), +(5,'2026-02-03','Payment for Purchase #2','PurchasePayment #2',2,'2026-02-03 04:17:33.099666',17), +(7,'2026-02-03','Sale Invoice #18','Sale #18',18,'2026-02-03 05:59:41.804161',8), +(8,'2026-02-03','Payment for Sale #18','SalePayment #5',5,'2026-02-03 05:59:41.823638',18), +(10,'2026-02-03','Sale Invoice #19','Sale #19',19,'2026-02-03 06:07:24.481047',8), +(11,'2026-02-03','Payment for Sale #19','SalePayment #6',6,'2026-02-03 06:07:24.491682',18), +(13,'2026-02-05','Sale Invoice #20','Sale #20',20,'2026-02-05 12:53:16.963921',8), +(15,'2026-02-05','Sale Invoice #21','Sale #21',21,'2026-02-05 13:09:39.149488',8), +(16,'2026-02-05','Payment for Sale #21','SalePayment #7',7,'2026-02-05 13:09:39.174460',18), +(17,'2026-02-06','Purchase Invoice #3','Purchase #3',3,'2026-02-06 05:52:34.612218',12), +(19,'2026-02-06','Sale Invoice #22','Sale #22',22,'2026-02-06 07:17:39.020197',8), +(20,'2026-02-06','Payment for Sale #22','SalePayment #8',8,'2026-02-06 07:17:39.063531',18), +(22,'2026-02-06','Sale Invoice #23','Sale #23',23,'2026-02-06 07:46:49.440656',8), +(23,'2026-02-06','Payment for Sale #23','SalePayment #9',9,'2026-02-06 07:46:49.467691',18), +(25,'2026-02-08','Expense: Salary','Expense #2',2,'2026-02-08 05:34:35.998613',31), +(26,'2026-02-10','Sale Invoice #24','Sale #24',24,'2026-02-10 03:04:16.023044',8), +(27,'2026-02-10','Payment for Sale #24','SalePayment #10',10,'2026-02-10 03:04:16.092749',18), +(28,'2026-02-10','Sale Invoice #25','Sale #25',25,'2026-02-10 03:08:51.914034',8), +(29,'2026-02-10','Payment for Sale #25','SalePayment #11',11,'2026-02-10 03:08:51.925347',18), +(31,'2026-02-10','Payment for Purchase #6','PurchasePayment #3',3,'2026-02-10 03:46:15.685209',17), +(32,'2026-02-10','Purchase Invoice #6','Purchase #6',6,'2026-02-10 03:46:15.708746',12), +(34,'2026-02-10','Sale Invoice #26','Sale #26',26,'2026-02-10 15:17:49.941248',8), +(35,'2026-02-10','Payment for Sale #26','SalePayment #12',12,'2026-02-10 15:17:50.196015',18), +(37,'2026-02-10','Purchase Invoice #8','Purchase #8',8,'2026-02-10 15:21:43.476820',12); +/*!40000 ALTER TABLE `accounting_journalentry` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `accounting_journalitem` +-- + +DROP TABLE IF EXISTS `accounting_journalitem`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `accounting_journalitem` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `type` varchar(10) NOT NULL, + `amount` decimal(15,3) NOT NULL, + `notes` varchar(255) NOT NULL, + `account_id` bigint(20) NOT NULL, + `entry_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + KEY `accounting_journalit_account_id_059cd84b_fk_accountin` (`account_id`), + KEY `accounting_journalit_entry_id_77fe1231_fk_accountin` (`entry_id`), + CONSTRAINT `accounting_journalit_account_id_059cd84b_fk_accountin` FOREIGN KEY (`account_id`) REFERENCES `accounting_account` (`id`), + CONSTRAINT `accounting_journalit_entry_id_77fe1231_fk_accountin` FOREIGN KEY (`entry_id`) REFERENCES `accounting_journalentry` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=73 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `accounting_journalitem` +-- + +LOCK TABLES `accounting_journalitem` WRITE; +/*!40000 ALTER TABLE `accounting_journalitem` DISABLE KEYS */; +INSERT INTO `accounting_journalitem` VALUES +(3,'debit',7.500,'',3,2), +(4,'credit',7.500,'',9,2), +(7,'debit',122.000,'',4,4), +(8,'credit',122.000,'',5,4), +(9,'debit',22.000,'',5,5), +(10,'credit',22.000,'',1,5), +(13,'debit',55.000,'',3,7), +(14,'credit',55.000,'',9,7), +(15,'debit',55.000,'',1,8), +(16,'credit',55.000,'',3,8), +(19,'debit',2.500,'',3,10), +(20,'credit',2.500,'',9,10), +(21,'debit',2.500,'',1,11), +(22,'credit',2.500,'',3,11), +(25,'debit',1002.950,'',3,13), +(26,'credit',1002.950,'',9,13), +(29,'debit',1.523,'',3,15), +(30,'credit',1.523,'',9,15), +(31,'debit',1.523,'',1,16), +(32,'credit',1.523,'',3,16), +(33,'debit',100.000,'',4,17), +(34,'credit',100.000,'',5,17), +(37,'debit',3.885,'',3,19), +(38,'credit',3.885,'',9,19), +(39,'debit',3.885,'',1,20), +(40,'credit',3.885,'',3,20), +(43,'debit',1.523,'',3,22), +(44,'credit',1.523,'',9,22), +(45,'debit',1.523,'',1,23), +(46,'credit',1.523,'',3,23), +(47,'debit',1000.000,'',15,25), +(48,'credit',1000.000,'',1,25), +(49,'debit',2.500,'',3,26), +(50,'credit',2.500,'',9,26), +(51,'debit',2.500,'',1,27), +(52,'credit',2.500,'',3,27), +(53,'debit',2.500,'',3,28), +(54,'credit',2.500,'',9,28), +(55,'debit',2.500,'',1,29), +(56,'credit',2.500,'',3,29), +(59,'debit',1.000,'',5,31), +(60,'credit',1.000,'',1,31), +(61,'debit',1.000,'',4,32), +(62,'credit',1.000,'',5,32), +(65,'debit',26.250,'',3,34), +(66,'credit',26.250,'',9,34), +(67,'debit',26.250,'',1,35), +(68,'credit',26.250,'',3,35), +(71,'debit',25.000,'',4,37), +(72,'credit',25.000,'',5,37); +/*!40000 ALTER TABLE `accounting_journalitem` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `auth_group` +-- + +DROP TABLE IF EXISTS `auth_group`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `auth_group` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(150) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `name` (`name`) +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `auth_group` +-- + +LOCK TABLES `auth_group` WRITE; +/*!40000 ALTER TABLE `auth_group` DISABLE KEYS */; +INSERT INTO `auth_group` VALUES +(3,'accountant'), +(1,'admin'), +(4,'cashier'), +(2,'manager'); +/*!40000 ALTER TABLE `auth_group` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `auth_group_permissions` +-- + +DROP TABLE IF EXISTS `auth_group_permissions`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `auth_group_permissions` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `group_id` int(11) NOT NULL, + `permission_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `auth_group_permissions_group_id_permission_id_0cd325b0_uniq` (`group_id`,`permission_id`), + KEY `auth_group_permissio_permission_id_84c5c92e_fk_auth_perm` (`permission_id`), + CONSTRAINT `auth_group_permissio_permission_id_84c5c92e_fk_auth_perm` FOREIGN KEY (`permission_id`) REFERENCES `auth_permission` (`id`), + CONSTRAINT `auth_group_permissions_group_id_b120cbf9_fk_auth_group_id` FOREIGN KEY (`group_id`) REFERENCES `auth_group` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `auth_group_permissions` +-- + +LOCK TABLES `auth_group_permissions` WRITE; +/*!40000 ALTER TABLE `auth_group_permissions` DISABLE KEYS */; +/*!40000 ALTER TABLE `auth_group_permissions` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `auth_permission` +-- + +DROP TABLE IF EXISTS `auth_permission`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `auth_permission` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `content_type_id` int(11) NOT NULL, + `codename` varchar(100) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `auth_permission_content_type_id_codename_01ab375a_uniq` (`content_type_id`,`codename`), + CONSTRAINT `auth_permission_content_type_id_2f476e4b_fk_django_co` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=181 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `auth_permission` +-- + +LOCK TABLES `auth_permission` WRITE; +/*!40000 ALTER TABLE `auth_permission` DISABLE KEYS */; +INSERT INTO `auth_permission` VALUES +(1,'Can add log entry',1,'add_logentry'), +(2,'Can change log entry',1,'change_logentry'), +(3,'Can delete log entry',1,'delete_logentry'), +(4,'Can view log entry',1,'view_logentry'), +(5,'Can add permission',2,'add_permission'), +(6,'Can change permission',2,'change_permission'), +(7,'Can delete permission',2,'delete_permission'), +(8,'Can view permission',2,'view_permission'), +(9,'Can add group',3,'add_group'), +(10,'Can change group',3,'change_group'), +(11,'Can delete group',3,'delete_group'), +(12,'Can view group',3,'view_group'), +(13,'Can add user',4,'add_user'), +(14,'Can change user',4,'change_user'), +(15,'Can delete user',4,'delete_user'), +(16,'Can view user',4,'view_user'), +(17,'Can add content type',5,'add_contenttype'), +(18,'Can change content type',5,'change_contenttype'), +(19,'Can delete content type',5,'delete_contenttype'), +(20,'Can view content type',5,'view_contenttype'), +(21,'Can add session',6,'add_session'), +(22,'Can change session',6,'change_session'), +(23,'Can delete session',6,'delete_session'), +(24,'Can view session',6,'view_session'), +(25,'Can add sale item',7,'add_saleitem'), +(26,'Can change sale item',7,'change_saleitem'), +(27,'Can delete sale item',7,'delete_saleitem'), +(28,'Can view sale item',7,'view_saleitem'), +(29,'Can add sale',8,'add_sale'), +(30,'Can change sale',8,'change_sale'), +(31,'Can delete sale',8,'delete_sale'), +(32,'Can view sale',8,'view_sale'), +(33,'Can add customer',9,'add_customer'), +(34,'Can change customer',9,'change_customer'), +(35,'Can delete customer',9,'delete_customer'), +(36,'Can view customer',9,'view_customer'), +(37,'Can add product',10,'add_product'), +(38,'Can change product',10,'change_product'), +(39,'Can delete product',10,'delete_product'), +(40,'Can view product',10,'view_product'), +(41,'Can add category',11,'add_category'), +(42,'Can change category',11,'change_category'), +(43,'Can delete category',11,'delete_category'), +(44,'Can view category',11,'view_category'), +(45,'Can add purchase',12,'add_purchase'), +(46,'Can change purchase',12,'change_purchase'), +(47,'Can delete purchase',12,'delete_purchase'), +(48,'Can view purchase',12,'view_purchase'), +(49,'Can add supplier',13,'add_supplier'), +(50,'Can change supplier',13,'change_supplier'), +(51,'Can delete supplier',13,'delete_supplier'), +(52,'Can view supplier',13,'view_supplier'), +(53,'Can add system setting',14,'add_systemsetting'), +(54,'Can change system setting',14,'change_systemsetting'), +(55,'Can delete system setting',14,'delete_systemsetting'), +(56,'Can view system setting',14,'view_systemsetting'), +(57,'Can add unit',15,'add_unit'), +(58,'Can change unit',15,'change_unit'), +(59,'Can delete unit',15,'delete_unit'), +(60,'Can view unit',15,'view_unit'), +(61,'Can add purchase item',16,'add_purchaseitem'), +(62,'Can change purchase item',16,'change_purchaseitem'), +(63,'Can delete purchase item',16,'delete_purchaseitem'), +(64,'Can view purchase item',16,'view_purchaseitem'), +(65,'Can add purchase payment',17,'add_purchasepayment'), +(66,'Can change purchase payment',17,'change_purchasepayment'), +(67,'Can delete purchase payment',17,'delete_purchasepayment'), +(68,'Can view purchase payment',17,'view_purchasepayment'), +(69,'Can add sale payment',18,'add_salepayment'), +(70,'Can change sale payment',18,'change_salepayment'), +(71,'Can delete sale payment',18,'delete_salepayment'), +(72,'Can view sale payment',18,'view_salepayment'), +(73,'Can add quotation',19,'add_quotation'), +(74,'Can change quotation',19,'change_quotation'), +(75,'Can delete quotation',19,'delete_quotation'), +(76,'Can view quotation',19,'view_quotation'), +(77,'Can add quotation item',20,'add_quotationitem'), +(78,'Can change quotation item',20,'change_quotationitem'), +(79,'Can delete quotation item',20,'delete_quotationitem'), +(80,'Can view quotation item',20,'view_quotationitem'), +(81,'Can add sale return item',21,'add_salereturnitem'), +(82,'Can change sale return item',21,'change_salereturnitem'), +(83,'Can delete sale return item',21,'delete_salereturnitem'), +(84,'Can view sale return item',21,'view_salereturnitem'), +(85,'Can add purchase return item',22,'add_purchasereturnitem'), +(86,'Can change purchase return item',22,'change_purchasereturnitem'), +(87,'Can delete purchase return item',22,'delete_purchasereturnitem'), +(88,'Can view purchase return item',22,'view_purchasereturnitem'), +(89,'Can add purchase return',23,'add_purchasereturn'), +(90,'Can change purchase return',23,'change_purchasereturn'), +(91,'Can delete purchase return',23,'delete_purchasereturn'), +(92,'Can view purchase return',23,'view_purchasereturn'), +(93,'Can add sale return',24,'add_salereturn'), +(94,'Can change sale return',24,'change_salereturn'), +(95,'Can delete sale return',24,'delete_salereturn'), +(96,'Can view sale return',24,'view_salereturn'), +(97,'Can add payment method',25,'add_paymentmethod'), +(98,'Can change payment method',25,'change_paymentmethod'), +(99,'Can delete payment method',25,'delete_paymentmethod'), +(100,'Can view payment method',25,'view_paymentmethod'), +(101,'Can add held sale',26,'add_heldsale'), +(102,'Can change held sale',26,'change_heldsale'), +(103,'Can delete held sale',26,'delete_heldsale'), +(104,'Can view held sale',26,'view_heldsale'), +(105,'Can add loyalty tier',27,'add_loyaltytier'), +(106,'Can change loyalty tier',27,'change_loyaltytier'), +(107,'Can delete loyalty tier',27,'delete_loyaltytier'), +(108,'Can view loyalty tier',27,'view_loyaltytier'), +(109,'Can add loyalty transaction',28,'add_loyaltytransaction'), +(110,'Can change loyalty transaction',28,'change_loyaltytransaction'), +(111,'Can delete loyalty transaction',28,'delete_loyaltytransaction'), +(112,'Can view loyalty transaction',28,'view_loyaltytransaction'), +(113,'Can add user profile',29,'add_userprofile'), +(114,'Can change user profile',29,'change_userprofile'), +(115,'Can delete user profile',29,'delete_userprofile'), +(116,'Can view user profile',29,'view_userprofile'), +(117,'Can add expense category',30,'add_expensecategory'), +(118,'Can change expense category',30,'change_expensecategory'), +(119,'Can delete expense category',30,'delete_expensecategory'), +(120,'Can view expense category',30,'view_expensecategory'), +(121,'Can add expense',31,'add_expense'), +(122,'Can change expense',31,'change_expense'), +(123,'Can delete expense',31,'delete_expense'), +(124,'Can view expense',31,'view_expense'), +(125,'Can add account',32,'add_account'), +(126,'Can change account',32,'change_account'), +(127,'Can delete account',32,'delete_account'), +(128,'Can view account',32,'view_account'), +(129,'Can add journal item',33,'add_journalitem'), +(130,'Can change journal item',33,'change_journalitem'), +(131,'Can delete journal item',33,'delete_journalitem'), +(132,'Can view journal item',33,'view_journalitem'), +(133,'Can add journal entry',34,'add_journalentry'), +(134,'Can change journal entry',34,'change_journalentry'), +(135,'Can delete journal entry',34,'delete_journalentry'), +(136,'Can view journal entry',34,'view_journalentry'), +(137,'Can add device',35,'add_device'), +(138,'Can change device',35,'change_device'), +(139,'Can delete device',35,'delete_device'), +(140,'Can view device',35,'view_device'), +(141,'Can add leave request',36,'add_leaverequest'), +(142,'Can change leave request',36,'change_leaverequest'), +(143,'Can delete leave request',36,'delete_leaverequest'), +(144,'Can view leave request',36,'view_leaverequest'), +(145,'Can add department',37,'add_department'), +(146,'Can change department',37,'change_department'), +(147,'Can delete department',37,'delete_department'), +(148,'Can view department',37,'view_department'), +(149,'Can add employee',38,'add_employee'), +(150,'Can change employee',38,'change_employee'), +(151,'Can delete employee',38,'delete_employee'), +(152,'Can view employee',38,'view_employee'), +(153,'Can add job position',39,'add_jobposition'), +(154,'Can change job position',39,'change_jobposition'), +(155,'Can delete job position',39,'delete_jobposition'), +(156,'Can view job position',39,'view_jobposition'), +(157,'Can add attendance',40,'add_attendance'), +(158,'Can change attendance',40,'change_attendance'), +(159,'Can delete attendance',40,'delete_attendance'), +(160,'Can view attendance',40,'view_attendance'), +(161,'Can add biometric device',41,'add_biometricdevice'), +(162,'Can change biometric device',41,'change_biometricdevice'), +(163,'Can delete biometric device',41,'delete_biometricdevice'), +(164,'Can view biometric device',41,'view_biometricdevice'), +(165,'Can add purchase order',42,'add_purchaseorder'), +(166,'Can change purchase order',42,'change_purchaseorder'), +(167,'Can delete purchase order',42,'delete_purchaseorder'), +(168,'Can view purchase order',42,'view_purchaseorder'), +(169,'Can add purchase order item',43,'add_purchaseorderitem'), +(170,'Can change purchase order item',43,'change_purchaseorderitem'), +(171,'Can delete purchase order item',43,'delete_purchaseorderitem'), +(172,'Can view purchase order item',43,'view_purchaseorderitem'), +(173,'Can add Cashier Counter Registry',44,'add_cashiercounterregistry'), +(174,'Can change Cashier Counter Registry',44,'change_cashiercounterregistry'), +(175,'Can delete Cashier Counter Registry',44,'delete_cashiercounterregistry'), +(176,'Can view Cashier Counter Registry',44,'view_cashiercounterregistry'), +(177,'Can add cashier session',45,'add_cashiersession'), +(178,'Can change cashier session',45,'change_cashiersession'), +(179,'Can delete cashier session',45,'delete_cashiersession'), +(180,'Can view cashier session',45,'view_cashiersession'); +/*!40000 ALTER TABLE `auth_permission` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `auth_user` +-- + +DROP TABLE IF EXISTS `auth_user`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `auth_user` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `password` varchar(128) NOT NULL, + `last_login` datetime(6) DEFAULT NULL, + `is_superuser` tinyint(1) NOT NULL, + `username` varchar(150) NOT NULL, + `first_name` varchar(150) NOT NULL, + `last_name` varchar(150) NOT NULL, + `email` varchar(254) NOT NULL, + `is_staff` tinyint(1) NOT NULL, + `is_active` tinyint(1) NOT NULL, + `date_joined` datetime(6) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `username` (`username`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `auth_user` +-- + +LOCK TABLES `auth_user` WRITE; +/*!40000 ALTER TABLE `auth_user` DISABLE KEYS */; +INSERT INTO `auth_user` VALUES +(1,'pbkdf2_sha256$1000000$q0WUfExOSfngHQWhUiSf8J$1HDj47RS3/NF1mvJ/ELkt06k43hRqxwu2dfcTT24O3E=','2026-02-10 06:04:53.713070',1,'admin','Moosa Ali','Al-Abri','aalabry@gmail.com',1,1,'2026-02-02 06:58:12.616144'), +(2,'pbkdf2_sha256$1000000$D2l0oUwMFQa8WYRoXqgtJC$fcZlzvv6geNXBeA2U9D05Mvz1GwLnDpbovQ4ykSO1OE=',NULL,0,'zaher','','','zaher@gmail.com',0,1,'2026-02-11 02:43:49.530998'); +/*!40000 ALTER TABLE `auth_user` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `auth_user_groups` +-- + +DROP TABLE IF EXISTS `auth_user_groups`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `auth_user_groups` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `group_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `auth_user_groups_user_id_group_id_94350c0c_uniq` (`user_id`,`group_id`), + KEY `auth_user_groups_group_id_97559544_fk_auth_group_id` (`group_id`), + CONSTRAINT `auth_user_groups_group_id_97559544_fk_auth_group_id` FOREIGN KEY (`group_id`) REFERENCES `auth_group` (`id`), + CONSTRAINT `auth_user_groups_user_id_6a12ed8b_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `auth_user_groups` +-- + +LOCK TABLES `auth_user_groups` WRITE; +/*!40000 ALTER TABLE `auth_user_groups` DISABLE KEYS */; +INSERT INTO `auth_user_groups` VALUES +(1,2,1); +/*!40000 ALTER TABLE `auth_user_groups` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `auth_user_user_permissions` +-- + +DROP TABLE IF EXISTS `auth_user_user_permissions`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `auth_user_user_permissions` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `permission_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `auth_user_user_permissions_user_id_permission_id_14a6b632_uniq` (`user_id`,`permission_id`), + KEY `auth_user_user_permi_permission_id_1fbb5f2c_fk_auth_perm` (`permission_id`), + CONSTRAINT `auth_user_user_permi_permission_id_1fbb5f2c_fk_auth_perm` FOREIGN KEY (`permission_id`) REFERENCES `auth_permission` (`id`), + CONSTRAINT `auth_user_user_permissions_user_id_a95ead1b_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `auth_user_user_permissions` +-- + +LOCK TABLES `auth_user_user_permissions` WRITE; +/*!40000 ALTER TABLE `auth_user_user_permissions` DISABLE KEYS */; +/*!40000 ALTER TABLE `auth_user_user_permissions` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `core_cashiercounterregistry` +-- + +DROP TABLE IF EXISTS `core_cashiercounterregistry`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `core_cashiercounterregistry` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `assigned_at` datetime(6) NOT NULL, + `cashier_id` int(11) NOT NULL, + `counter_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `cashier_id` (`cashier_id`), + KEY `core_cashiercounterr_counter_id_31c8f16f_fk_core_devi` (`counter_id`), + CONSTRAINT `core_cashiercounterr_counter_id_31c8f16f_fk_core_devi` FOREIGN KEY (`counter_id`) REFERENCES `core_device` (`id`), + CONSTRAINT `core_cashiercounterregistry_cashier_id_a7e6c6d5_fk_auth_user_id` FOREIGN KEY (`cashier_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `core_cashiercounterregistry` +-- + +LOCK TABLES `core_cashiercounterregistry` WRITE; +/*!40000 ALTER TABLE `core_cashiercounterregistry` DISABLE KEYS */; +INSERT INTO `core_cashiercounterregistry` VALUES +(1,'2026-02-06 07:16:54.349022',1,1); +/*!40000 ALTER TABLE `core_cashiercounterregistry` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `core_cashiersession` +-- + +DROP TABLE IF EXISTS `core_cashiersession`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `core_cashiersession` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `start_time` datetime(6) NOT NULL, + `end_time` datetime(6) DEFAULT NULL, + `opening_balance` decimal(15,3) NOT NULL, + `closing_balance` decimal(15,3) DEFAULT NULL, + `status` varchar(20) NOT NULL, + `notes` longtext NOT NULL, + `counter_id` bigint(20) DEFAULT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `core_cashiersession_counter_id_37347545_fk_core_device_id` (`counter_id`), + KEY `core_cashiersession_user_id_162d4b9a_fk_auth_user_id` (`user_id`), + CONSTRAINT `core_cashiersession_counter_id_37347545_fk_core_device_id` FOREIGN KEY (`counter_id`) REFERENCES `core_device` (`id`), + CONSTRAINT `core_cashiersession_user_id_162d4b9a_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `core_cashiersession` +-- + +LOCK TABLES `core_cashiersession` WRITE; +/*!40000 ALTER TABLE `core_cashiersession` DISABLE KEYS */; +INSERT INTO `core_cashiersession` VALUES +(1,'2026-02-06 07:46:39.146930','2026-02-07 11:42:33.791612',0.000,NULL,'closed','',1,1), +(2,'2026-02-07 12:52:12.107810','2026-02-10 04:49:10.674247',0.000,NULL,'closed','',1,1), +(3,'2026-02-10 04:49:35.756519',NULL,0.000,NULL,'active','',1,1); +/*!40000 ALTER TABLE `core_cashiersession` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `core_category` +-- + +DROP TABLE IF EXISTS `core_category`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `core_category` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name_en` varchar(100) NOT NULL, + `name_ar` varchar(100) NOT NULL, + `slug` varchar(50) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `slug` (`slug`) +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `core_category` +-- + +LOCK TABLES `core_category` WRITE; +/*!40000 ALTER TABLE `core_category` DISABLE KEYS */; +INSERT INTO `core_category` VALUES +(1,'Electronics','إلكترونيات','electronics'), +(2,'Groceries','بقالة','groceries'), +(3,'Milk','حليب','milk'), +(4,'Spices','بهلارات','spices'); +/*!40000 ALTER TABLE `core_category` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `core_customer` +-- + +DROP TABLE IF EXISTS `core_customer`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `core_customer` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name` varchar(200) NOT NULL, + `phone` varchar(20) NOT NULL, + `email` varchar(254) NOT NULL, + `address` longtext NOT NULL, + `loyalty_points` decimal(15,2) NOT NULL, + `loyalty_tier_id` bigint(20) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `core_customer_loyalty_tier_id_9b2bc0c2_fk_core_loyaltytier_id` (`loyalty_tier_id`), + CONSTRAINT `core_customer_loyalty_tier_id_9b2bc0c2_fk_core_loyaltytier_id` FOREIGN KEY (`loyalty_tier_id`) REFERENCES `core_loyaltytier` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `core_customer` +-- + +LOCK TABLES `core_customer` WRITE; +/*!40000 ALTER TABLE `core_customer` DISABLE KEYS */; +INSERT INTO `core_customer` VALUES +(1,'Walk-in Customer','','','',0.00,NULL), +(2,'Moosa Ali Al-Abri','99359472','aalabry@gmail.com','AL Hamra\nAL Hamra',0.00,NULL); +/*!40000 ALTER TABLE `core_customer` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `core_device` +-- + +DROP TABLE IF EXISTS `core_device`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `core_device` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL, + `device_type` varchar(20) NOT NULL, + `connection_type` varchar(20) NOT NULL, + `ip_address` char(39) DEFAULT NULL, + `port` int(10) unsigned DEFAULT NULL CHECK (`port` >= 0), + `is_active` tinyint(1) NOT NULL, + `config_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`config_json`)), + `created_at` datetime(6) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `core_device` +-- + +LOCK TABLES `core_device` WRITE; +/*!40000 ALTER TABLE `core_device` DISABLE KEYS */; +INSERT INTO `core_device` VALUES +(1,'Pos Counter1','counter','network',NULL,NULL,1,NULL,'2026-02-06 07:10:22.737381'), +(2,'Pos Counter2','counter','network',NULL,NULL,1,NULL,'2026-02-06 07:10:40.321561'); +/*!40000 ALTER TABLE `core_device` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `core_expense` +-- + +DROP TABLE IF EXISTS `core_expense`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `core_expense` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `amount` decimal(15,3) NOT NULL, + `date` date NOT NULL, + `description` longtext NOT NULL, + `attachment` varchar(100) DEFAULT NULL, + `created_at` datetime(6) NOT NULL, + `created_by_id` int(11) DEFAULT NULL, + `payment_method_id` bigint(20) DEFAULT NULL, + `category_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + KEY `core_expense_created_by_id_f387daf3_fk_auth_user_id` (`created_by_id`), + KEY `core_expense_payment_method_id_14c954bf_fk_core_paymentmethod_id` (`payment_method_id`), + KEY `core_expense_category_id_dcdb74b3_fk_core_expensecategory_id` (`category_id`), + CONSTRAINT `core_expense_category_id_dcdb74b3_fk_core_expensecategory_id` FOREIGN KEY (`category_id`) REFERENCES `core_expensecategory` (`id`), + CONSTRAINT `core_expense_created_by_id_f387daf3_fk_auth_user_id` FOREIGN KEY (`created_by_id`) REFERENCES `auth_user` (`id`), + CONSTRAINT `core_expense_payment_method_id_14c954bf_fk_core_paymentmethod_id` FOREIGN KEY (`payment_method_id`) REFERENCES `core_paymentmethod` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `core_expense` +-- + +LOCK TABLES `core_expense` WRITE; +/*!40000 ALTER TABLE `core_expense` DISABLE KEYS */; +INSERT INTO `core_expense` VALUES +(2,1000.000,'2026-02-08','','','2026-02-08 05:34:35.947064',1,1,1); +/*!40000 ALTER TABLE `core_expense` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `core_expensecategory` +-- + +DROP TABLE IF EXISTS `core_expensecategory`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `core_expensecategory` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name_en` varchar(100) NOT NULL, + `name_ar` varchar(100) NOT NULL, + `description` longtext NOT NULL, + `accounting_account_id` bigint(20) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `core_expensecategory_accounting_account_i_39554ddb_fk_accountin` (`accounting_account_id`), + CONSTRAINT `core_expensecategory_accounting_account_i_39554ddb_fk_accountin` FOREIGN KEY (`accounting_account_id`) REFERENCES `accounting_account` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `core_expensecategory` +-- + +LOCK TABLES `core_expensecategory` WRITE; +/*!40000 ALTER TABLE `core_expensecategory` DISABLE KEYS */; +INSERT INTO `core_expensecategory` VALUES +(1,'Salary','رولتب','',NULL); +/*!40000 ALTER TABLE `core_expensecategory` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `core_heldsale` +-- + +DROP TABLE IF EXISTS `core_heldsale`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `core_heldsale` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `cart_data` longtext NOT NULL, + `created_at` datetime(6) NOT NULL, + `created_by_id` int(11) DEFAULT NULL, + `customer_name` varchar(200) NOT NULL, + `note` longtext NOT NULL, + PRIMARY KEY (`id`), + KEY `core_heldsale_created_by_id_92d4a48c_fk_auth_user_id` (`created_by_id`), + CONSTRAINT `core_heldsale_created_by_id_92d4a48c_fk_auth_user_id` FOREIGN KEY (`created_by_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `core_heldsale` +-- + +LOCK TABLES `core_heldsale` WRITE; +/*!40000 ALTER TABLE `core_heldsale` DISABLE KEYS */; +/*!40000 ALTER TABLE `core_heldsale` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `core_loyaltytier` +-- + +DROP TABLE IF EXISTS `core_loyaltytier`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `core_loyaltytier` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name_en` varchar(50) NOT NULL, + `name_ar` varchar(50) NOT NULL, + `min_points` int(10) unsigned NOT NULL CHECK (`min_points` >= 0), + `point_multiplier` decimal(4,2) NOT NULL, + `discount_percentage` decimal(5,2) NOT NULL, + `color_code` varchar(20) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `core_loyaltytier` +-- + +LOCK TABLES `core_loyaltytier` WRITE; +/*!40000 ALTER TABLE `core_loyaltytier` DISABLE KEYS */; +/*!40000 ALTER TABLE `core_loyaltytier` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `core_loyaltytransaction` +-- + +DROP TABLE IF EXISTS `core_loyaltytransaction`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `core_loyaltytransaction` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `transaction_type` varchar(20) NOT NULL, + `points` decimal(15,2) NOT NULL, + `notes` longtext NOT NULL, + `created_at` datetime(6) NOT NULL, + `customer_id` bigint(20) NOT NULL, + `sale_id` bigint(20) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `core_loyaltytransaction_customer_id_e94400f6_fk_core_customer_id` (`customer_id`), + KEY `core_loyaltytransaction_sale_id_5797482d_fk_core_sale_id` (`sale_id`), + CONSTRAINT `core_loyaltytransaction_customer_id_e94400f6_fk_core_customer_id` FOREIGN KEY (`customer_id`) REFERENCES `core_customer` (`id`), + CONSTRAINT `core_loyaltytransaction_sale_id_5797482d_fk_core_sale_id` FOREIGN KEY (`sale_id`) REFERENCES `core_sale` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `core_loyaltytransaction` +-- + +LOCK TABLES `core_loyaltytransaction` WRITE; +/*!40000 ALTER TABLE `core_loyaltytransaction` DISABLE KEYS */; +/*!40000 ALTER TABLE `core_loyaltytransaction` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `core_paymentmethod` +-- + +DROP TABLE IF EXISTS `core_paymentmethod`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `core_paymentmethod` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name_en` varchar(50) NOT NULL, + `name_ar` varchar(50) NOT NULL, + `is_active` tinyint(1) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `core_paymentmethod` +-- + +LOCK TABLES `core_paymentmethod` WRITE; +/*!40000 ALTER TABLE `core_paymentmethod` DISABLE KEYS */; +INSERT INTO `core_paymentmethod` VALUES +(1,'Cash','كاش',1), +(2,'Credit Card','بطاقة بنكية',1), +(3,'Bank Transfer','تحويل بنكي',1); +/*!40000 ALTER TABLE `core_paymentmethod` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `core_product` +-- + +DROP TABLE IF EXISTS `core_product`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `core_product` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name_en` varchar(200) NOT NULL, + `name_ar` varchar(200) NOT NULL, + `sku` varchar(50) NOT NULL, + `description` longtext NOT NULL, + `price` decimal(12,3) NOT NULL, + `stock_quantity` decimal(15,2) NOT NULL, + `image` varchar(100) DEFAULT NULL, + `created_at` datetime(6) NOT NULL, + `category_id` bigint(20) NOT NULL, + `unit_id` bigint(20) DEFAULT NULL, + `cost_price` decimal(12,3) NOT NULL, + `is_active` tinyint(1) NOT NULL, + `opening_stock` decimal(15,2) NOT NULL, + `supplier_id` bigint(20) DEFAULT NULL, + `vat` decimal(5,2) NOT NULL, + `expiry_date` date DEFAULT NULL, + `has_expiry` tinyint(1) NOT NULL, + `min_stock_level` decimal(15,2) NOT NULL, + `is_service` tinyint(1) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + UNIQUE KEY `sku` (`sku`), + KEY `core_product_category_id_b9d8ff9f_fk_core_category_id` (`category_id`), + KEY `core_product_unit_id_9efe97b9_fk_core_unit_id` (`unit_id`), + KEY `core_product_supplier_id_493af3ba_fk_core_supplier_id` (`supplier_id`), + CONSTRAINT `core_product_category_id_b9d8ff9f_fk_core_category_id` FOREIGN KEY (`category_id`) REFERENCES `core_category` (`id`), + CONSTRAINT `core_product_supplier_id_493af3ba_fk_core_supplier_id` FOREIGN KEY (`supplier_id`) REFERENCES `core_supplier` (`id`), + CONSTRAINT `core_product_unit_id_9efe97b9_fk_core_unit_id` FOREIGN KEY (`unit_id`) REFERENCES `core_unit` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `core_product` +-- + +LOCK TABLES `core_product` WRITE; +/*!40000 ALTER TABLE `core_product` DISABLE KEYS */; +INSERT INTO `core_product` VALUES +(1,'Smartphone','هاتف ذكي','PHN001','',999.000,0.00,'','2026-02-02 06:51:10.670625',1,1,0.000,1,0.00,NULL,0.00,NULL,0,0.00,0), +(2,'Laptop','لابتوب','LPT001','',1499.000,0.00,NULL,'2026-02-02 06:51:10.677330',1,NULL,0.000,1,0.00,NULL,0.00,NULL,0,0.00,0), +(3,'Milk','حليب','MLK001','',2.500,360.00,'product_images/ةهمن_r3GdN2u.jfif','2026-02-02 06:51:10.683009',2,NULL,1.000,1,0.00,NULL,0.00,NULL,0,0.00,0), +(4,'Eggs','بيض بركاء','27021058','',1.200,19.00,'product_images/بيض.jfif','2026-02-03 10:24:17.560811',2,1,1.000,1,0.00,2,5.00,'2026-02-01',1,6.00,0), +(5,'Tomato','طماطم','38389726','',0.250,-0.70,'product_images/طماطم.jfif','2026-02-03 10:31:16.878306',2,1,0.200,1,5.52,2,5.00,NULL,0,53.55,0), +(6,'onion','بصل','SKU-20260210025300','',2.000,0.00,'','2026-02-10 02:53:38.726213',2,NULL,1.000,1,0.00,1,0.00,NULL,0,0.00,0), +(7,'rice','عيش','6117867','',15.500,0.00,'','2026-02-11 03:20:19.324414',2,2,12.000,1,0.00,2,5.00,NULL,0,0.00,0); +/*!40000 ALTER TABLE `core_product` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `core_purchase` +-- + +DROP TABLE IF EXISTS `core_purchase`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `core_purchase` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `total_amount` decimal(15,3) NOT NULL, + `created_at` datetime(6) NOT NULL, + `supplier_id` bigint(20) DEFAULT NULL, + `balance_due` decimal(15,3) NOT NULL, + `due_date` date DEFAULT NULL, + `invoice_number` varchar(50) NOT NULL, + `notes` longtext NOT NULL, + `paid_amount` decimal(15,3) NOT NULL, + `payment_type` varchar(20) NOT NULL, + `status` varchar(20) NOT NULL, + `created_by_id` int(11) DEFAULT NULL, + `purchase_order_id` bigint(20) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `core_purchase_supplier_id_cc98f995_fk_core_supplier_id` (`supplier_id`), + KEY `core_purchase_created_by_id_760ff6b8_fk_auth_user_id` (`created_by_id`), + KEY `core_purchase_purchase_order_id_5e55807a_fk_core_purc` (`purchase_order_id`), + CONSTRAINT `core_purchase_created_by_id_760ff6b8_fk_auth_user_id` FOREIGN KEY (`created_by_id`) REFERENCES `auth_user` (`id`), + CONSTRAINT `core_purchase_purchase_order_id_5e55807a_fk_core_purc` FOREIGN KEY (`purchase_order_id`) REFERENCES `core_purchaseorder` (`id`), + CONSTRAINT `core_purchase_supplier_id_cc98f995_fk_core_supplier_id` FOREIGN KEY (`supplier_id`) REFERENCES `core_supplier` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `core_purchase` +-- + +LOCK TABLES `core_purchase` WRITE; +/*!40000 ALTER TABLE `core_purchase` DISABLE KEYS */; +INSERT INTO `core_purchase` VALUES +(1,50.000,'2026-02-02 18:41:37.649354',2,0.000,'2026-02-12','','',50.000,'credit','paid',1,NULL), +(2,122.000,'2026-02-03 04:17:33.046505',2,100.000,'2026-02-12','','',22.000,'partial','partial',1,NULL), +(3,100.000,'2026-02-06 05:52:34.582607',2,100.000,NULL,'','Converted from LPO #1. ',0.000,'cash','unpaid',1,1), +(6,1.000,'2026-02-10 03:28:04.318066',1,0.000,NULL,'','',1.000,'cash','paid',1,NULL), +(8,25.000,'2026-02-10 15:21:43.415527',2,25.000,NULL,'','',0.000,'credit','unpaid',1,NULL); +/*!40000 ALTER TABLE `core_purchase` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `core_purchaseitem` +-- + +DROP TABLE IF EXISTS `core_purchaseitem`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `core_purchaseitem` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `quantity` decimal(15,2) NOT NULL, + `cost_price` decimal(12,3) NOT NULL, + `line_total` decimal(15,3) NOT NULL, + `product_id` bigint(20) NOT NULL, + `purchase_id` bigint(20) NOT NULL, + `expiry_date` date DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `core_purchaseitem_product_id_29f76f93_fk_core_product_id` (`product_id`), + KEY `core_purchaseitem_purchase_id_342c8f37_fk_core_purchase_id` (`purchase_id`), + CONSTRAINT `core_purchaseitem_product_id_29f76f93_fk_core_product_id` FOREIGN KEY (`product_id`) REFERENCES `core_product` (`id`), + CONSTRAINT `core_purchaseitem_purchase_id_342c8f37_fk_core_purchase_id` FOREIGN KEY (`purchase_id`) REFERENCES `core_purchase` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `core_purchaseitem` +-- + +LOCK TABLES `core_purchaseitem` WRITE; +/*!40000 ALTER TABLE `core_purchaseitem` DISABLE KEYS */; +INSERT INTO `core_purchaseitem` VALUES +(1,50.00,1.000,50.000,3,1,NULL), +(2,122.00,1.000,122.000,3,2,NULL), +(3,100.00,1.000,100.000,3,3,NULL), +(4,1.00,1.000,1.000,3,6,NULL), +(5,100.00,0.250,25.000,3,8,NULL); +/*!40000 ALTER TABLE `core_purchaseitem` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `core_purchaseorder` +-- + +DROP TABLE IF EXISTS `core_purchaseorder`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `core_purchaseorder` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `lpo_number` varchar(50) NOT NULL, + `total_amount` decimal(15,3) NOT NULL, + `status` varchar(20) NOT NULL, + `issue_date` date NOT NULL, + `expected_date` date DEFAULT NULL, + `notes` longtext NOT NULL, + `created_at` datetime(6) NOT NULL, + `created_by_id` int(11) DEFAULT NULL, + `supplier_id` bigint(20) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `core_purchaseorder_created_by_id_e567dc99_fk_auth_user_id` (`created_by_id`), + KEY `core_purchaseorder_supplier_id_0242d2c5_fk_core_supplier_id` (`supplier_id`), + CONSTRAINT `core_purchaseorder_created_by_id_e567dc99_fk_auth_user_id` FOREIGN KEY (`created_by_id`) REFERENCES `auth_user` (`id`), + CONSTRAINT `core_purchaseorder_supplier_id_0242d2c5_fk_core_supplier_id` FOREIGN KEY (`supplier_id`) REFERENCES `core_supplier` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `core_purchaseorder` +-- + +LOCK TABLES `core_purchaseorder` WRITE; +/*!40000 ALTER TABLE `core_purchaseorder` DISABLE KEYS */; +INSERT INTO `core_purchaseorder` VALUES +(1,'',100.000,'converted','2026-02-06',NULL,'','2026-02-06 05:51:13.574582',1,2); +/*!40000 ALTER TABLE `core_purchaseorder` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `core_purchaseorderitem` +-- + +DROP TABLE IF EXISTS `core_purchaseorderitem`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `core_purchaseorderitem` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `quantity` decimal(15,2) NOT NULL, + `cost_price` decimal(12,3) NOT NULL, + `line_total` decimal(15,3) NOT NULL, + `product_id` bigint(20) NOT NULL, + `purchase_order_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + KEY `core_purchaseorderitem_product_id_e4cc27f0_fk_core_product_id` (`product_id`), + KEY `core_purchaseorderit_purchase_order_id_ec9433f4_fk_core_purc` (`purchase_order_id`), + CONSTRAINT `core_purchaseorderit_purchase_order_id_ec9433f4_fk_core_purc` FOREIGN KEY (`purchase_order_id`) REFERENCES `core_purchaseorder` (`id`), + CONSTRAINT `core_purchaseorderitem_product_id_e4cc27f0_fk_core_product_id` FOREIGN KEY (`product_id`) REFERENCES `core_product` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `core_purchaseorderitem` +-- + +LOCK TABLES `core_purchaseorderitem` WRITE; +/*!40000 ALTER TABLE `core_purchaseorderitem` DISABLE KEYS */; +INSERT INTO `core_purchaseorderitem` VALUES +(1,100.00,1.000,100.000,3,1); +/*!40000 ALTER TABLE `core_purchaseorderitem` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `core_purchasepayment` +-- + +DROP TABLE IF EXISTS `core_purchasepayment`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `core_purchasepayment` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `amount` decimal(15,3) NOT NULL, + `payment_date` date NOT NULL, + `payment_method_id` bigint(20) DEFAULT NULL, + `notes` longtext NOT NULL, + `purchase_id` bigint(20) NOT NULL, + `created_by_id` int(11) DEFAULT NULL, + `payment_method_name` varchar(50) NOT NULL, + `created_at` datetime(6) NOT NULL, + PRIMARY KEY (`id`), + KEY `core_purchasepayment_purchase_id_1aacd0f7_fk_core_purchase_id` (`purchase_id`), + KEY `core_purchasepayment_created_by_id_62a27850_fk_auth_user_id` (`created_by_id`), + KEY `core_purchasepayment_payment_method_id_579400c1` (`payment_method_id`), + CONSTRAINT `core_purchasepayment_created_by_id_62a27850_fk_auth_user_id` FOREIGN KEY (`created_by_id`) REFERENCES `auth_user` (`id`), + CONSTRAINT `core_purchasepayment_payment_method_id_579400c1_fk_core_paym` FOREIGN KEY (`payment_method_id`) REFERENCES `core_paymentmethod` (`id`), + CONSTRAINT `core_purchasepayment_purchase_id_1aacd0f7_fk_core_purchase_id` FOREIGN KEY (`purchase_id`) REFERENCES `core_purchase` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `core_purchasepayment` +-- + +LOCK TABLES `core_purchasepayment` WRITE; +/*!40000 ALTER TABLE `core_purchasepayment` DISABLE KEYS */; +INSERT INTO `core_purchasepayment` VALUES +(1,50.000,'2026-02-02',1,'',1,1,'Cash','2026-02-07 11:42:08.649839'), +(2,22.000,'2026-02-03',1,'Initial payment',2,1,'Cash','2026-02-07 11:42:08.649839'), +(3,1.000,'2026-02-10',1,'',6,1,'Cash','2026-02-10 03:46:15.666864'); +/*!40000 ALTER TABLE `core_purchasepayment` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `core_purchasereturn` +-- + +DROP TABLE IF EXISTS `core_purchasereturn`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `core_purchasereturn` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `return_number` varchar(50) NOT NULL, + `total_amount` decimal(15,3) NOT NULL, + `notes` longtext NOT NULL, + `created_at` datetime(6) NOT NULL, + `purchase_id` bigint(20) DEFAULT NULL, + `supplier_id` bigint(20) DEFAULT NULL, + `created_by_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `core_purchasereturn_purchase_id_5cac043b_fk_core_purchase_id` (`purchase_id`), + KEY `core_purchasereturn_supplier_id_0f639b91_fk_core_supplier_id` (`supplier_id`), + KEY `core_purchasereturn_created_by_id_4d36f1df_fk_auth_user_id` (`created_by_id`), + CONSTRAINT `core_purchasereturn_created_by_id_4d36f1df_fk_auth_user_id` FOREIGN KEY (`created_by_id`) REFERENCES `auth_user` (`id`), + CONSTRAINT `core_purchasereturn_purchase_id_5cac043b_fk_core_purchase_id` FOREIGN KEY (`purchase_id`) REFERENCES `core_purchase` (`id`), + CONSTRAINT `core_purchasereturn_supplier_id_0f639b91_fk_core_supplier_id` FOREIGN KEY (`supplier_id`) REFERENCES `core_supplier` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `core_purchasereturn` +-- + +LOCK TABLES `core_purchasereturn` WRITE; +/*!40000 ALTER TABLE `core_purchasereturn` DISABLE KEYS */; +INSERT INTO `core_purchasereturn` VALUES +(1,'PR-1770696571',15.000,'','2026-02-10 04:09:31.499584',NULL,1,1); +/*!40000 ALTER TABLE `core_purchasereturn` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `core_purchasereturnitem` +-- + +DROP TABLE IF EXISTS `core_purchasereturnitem`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `core_purchasereturnitem` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `quantity` decimal(15,2) NOT NULL, + `cost_price` decimal(12,3) NOT NULL, + `line_total` decimal(15,3) NOT NULL, + `product_id` bigint(20) NOT NULL, + `purchase_return_id` bigint(20) NOT NULL, + `expiry_date` date DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `core_purchasereturnitem_product_id_59663fa3_fk_core_product_id` (`product_id`), + KEY `core_purchasereturni_purchase_return_id_9a26c3af_fk_core_purc` (`purchase_return_id`), + CONSTRAINT `core_purchasereturni_purchase_return_id_9a26c3af_fk_core_purc` FOREIGN KEY (`purchase_return_id`) REFERENCES `core_purchasereturn` (`id`), + CONSTRAINT `core_purchasereturnitem_product_id_59663fa3_fk_core_product_id` FOREIGN KEY (`product_id`) REFERENCES `core_product` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `core_purchasereturnitem` +-- + +LOCK TABLES `core_purchasereturnitem` WRITE; +/*!40000 ALTER TABLE `core_purchasereturnitem` DISABLE KEYS */; +INSERT INTO `core_purchasereturnitem` VALUES +(1,15.00,1.000,15.000,3,1,NULL); +/*!40000 ALTER TABLE `core_purchasereturnitem` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `core_quotation` +-- + +DROP TABLE IF EXISTS `core_quotation`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `core_quotation` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `quotation_number` varchar(50) NOT NULL, + `total_amount` decimal(15,3) NOT NULL, + `discount` decimal(15,3) NOT NULL, + `status` varchar(20) NOT NULL, + `valid_until` date DEFAULT NULL, + `terms_and_conditions` longtext NOT NULL, + `notes` longtext NOT NULL, + `created_at` datetime(6) NOT NULL, + `customer_id` bigint(20) DEFAULT NULL, + `created_by_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `core_quotation_customer_id_bfd4f481_fk_core_customer_id` (`customer_id`), + KEY `core_quotation_created_by_id_86c3c8ca_fk_auth_user_id` (`created_by_id`), + CONSTRAINT `core_quotation_created_by_id_86c3c8ca_fk_auth_user_id` FOREIGN KEY (`created_by_id`) REFERENCES `auth_user` (`id`), + CONSTRAINT `core_quotation_customer_id_bfd4f481_fk_core_customer_id` FOREIGN KEY (`customer_id`) REFERENCES `core_customer` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `core_quotation` +-- + +LOCK TABLES `core_quotation` WRITE; +/*!40000 ALTER TABLE `core_quotation` DISABLE KEYS */; +INSERT INTO `core_quotation` VALUES +(1,'',250.000,0.000,'draft',NULL,'1. Prices are valid for 7 days.\n2. Delivery within 3-5 working days.\n3. Payment: 50% advance, 50% on delivery.','','2026-02-02 09:53:56.702381',1,NULL); +/*!40000 ALTER TABLE `core_quotation` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `core_quotationitem` +-- + +DROP TABLE IF EXISTS `core_quotationitem`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `core_quotationitem` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `quantity` decimal(15,2) NOT NULL, + `unit_price` decimal(12,3) NOT NULL, + `line_total` decimal(15,3) NOT NULL, + `product_id` bigint(20) NOT NULL, + `quotation_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + KEY `core_quotationitem_product_id_1e6df638_fk_core_product_id` (`product_id`), + KEY `core_quotationitem_quotation_id_2c6cbe1d_fk_core_quotation_id` (`quotation_id`), + CONSTRAINT `core_quotationitem_product_id_1e6df638_fk_core_product_id` FOREIGN KEY (`product_id`) REFERENCES `core_product` (`id`), + CONSTRAINT `core_quotationitem_quotation_id_2c6cbe1d_fk_core_quotation_id` FOREIGN KEY (`quotation_id`) REFERENCES `core_quotation` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `core_quotationitem` +-- + +LOCK TABLES `core_quotationitem` WRITE; +/*!40000 ALTER TABLE `core_quotationitem` DISABLE KEYS */; +INSERT INTO `core_quotationitem` VALUES +(1,100.00,2.500,250.000,3,1); +/*!40000 ALTER TABLE `core_quotationitem` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `core_sale` +-- + +DROP TABLE IF EXISTS `core_sale`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `core_sale` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `total_amount` decimal(15,3) NOT NULL, + `discount` decimal(15,3) NOT NULL, + `created_at` datetime(6) NOT NULL, + `customer_id` bigint(20) DEFAULT NULL, + `balance_due` decimal(15,3) NOT NULL, + `due_date` date DEFAULT NULL, + `invoice_number` varchar(50) NOT NULL, + `notes` longtext NOT NULL, + `paid_amount` decimal(15,3) NOT NULL, + `payment_type` varchar(20) NOT NULL, + `status` varchar(20) NOT NULL, + `quotation_id` bigint(20) DEFAULT NULL, + `created_by_id` int(11) DEFAULT NULL, + `loyalty_discount_amount` decimal(15,3) NOT NULL, + `loyalty_points_redeemed` decimal(15,2) NOT NULL, + `subtotal` decimal(15,3) NOT NULL, + `vat_amount` decimal(15,3) NOT NULL, + PRIMARY KEY (`id`), + KEY `core_sale_customer_id_2acb5b23_fk_core_customer_id` (`customer_id`), + KEY `core_sale_quotation_id_ce0bb799_fk_core_quotation_id` (`quotation_id`), + KEY `core_sale_created_by_id_522d3175_fk_auth_user_id` (`created_by_id`), + CONSTRAINT `core_sale_created_by_id_522d3175_fk_auth_user_id` FOREIGN KEY (`created_by_id`) REFERENCES `auth_user` (`id`), + CONSTRAINT `core_sale_customer_id_2acb5b23_fk_core_customer_id` FOREIGN KEY (`customer_id`) REFERENCES `core_customer` (`id`), + CONSTRAINT `core_sale_quotation_id_ce0bb799_fk_core_quotation_id` FOREIGN KEY (`quotation_id`) REFERENCES `core_quotation` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `core_sale` +-- + +LOCK TABLES `core_sale` WRITE; +/*!40000 ALTER TABLE `core_sale` DISABLE KEYS */; +INSERT INTO `core_sale` VALUES +(1,3502.000,0.000,'2026-02-02 07:04:31.462885',NULL,0.000,NULL,'','',0.000,'cash','paid',NULL,NULL,0.000,0.00,0.000,0.000), +(2,4498.500,0.000,'2026-02-02 07:05:30.394955',1,0.000,NULL,'','',0.000,'cash','paid',NULL,NULL,0.000,0.00,0.000,0.000), +(3,4498.500,0.000,'2026-02-02 07:05:30.589347',1,0.000,NULL,'','',0.000,'cash','paid',NULL,NULL,0.000,0.00,0.000,0.000), +(4,2500.500,0.000,'2026-02-02 07:08:16.518995',NULL,0.000,NULL,'','',0.000,'cash','paid',NULL,NULL,0.000,0.00,0.000,0.000), +(5,999.000,0.000,'2026-02-02 07:36:00.126309',NULL,0.000,NULL,'','',0.000,'cash','paid',NULL,NULL,0.000,0.00,0.000,0.000), +(6,2500.500,0.000,'2026-02-02 07:38:59.920678',NULL,0.000,NULL,'','',0.000,'cash','paid',NULL,NULL,0.000,0.00,0.000,0.000), +(7,1001.500,0.000,'2026-02-02 07:42:22.926679',NULL,0.000,NULL,'','',0.000,'cash','paid',NULL,NULL,0.000,0.00,0.000,0.000), +(8,2003.000,0.000,'2026-02-02 07:52:04.729503',NULL,0.000,NULL,'','',0.000,'cash','paid',NULL,NULL,0.000,0.00,0.000,0.000), +(9,2.500,0.000,'2026-02-02 13:48:03.941937',NULL,0.000,NULL,'','',2.500,'cash','paid',NULL,1,0.000,0.00,0.000,0.000), +(10,5.000,0.000,'2026-02-02 16:30:26.276842',NULL,0.000,NULL,'','',5.000,'cash','paid',NULL,1,0.000,0.00,0.000,0.000), +(11,2.500,0.000,'2026-02-03 02:55:04.813106',1,0.000,'2026-02-05','','',2.500,'credit','paid',NULL,1,0.000,0.00,0.000,0.000), +(12,12.500,0.000,'2026-02-03 02:58:56.674344',1,7.500,'2026-02-07','','',5.000,'partial','partial',NULL,1,0.000,0.00,0.000,0.000), +(13,7.500,0.000,'2026-02-03 04:09:17.164110',1,0.000,NULL,'','',7.500,'cash','paid',NULL,1,0.000,0.00,0.000,0.000), +(14,7.500,0.000,'2026-02-03 04:09:34.938346',1,0.000,NULL,'','',7.500,'cash','paid',NULL,1,0.000,0.00,0.000,0.000), +(15,7.500,0.000,'2026-02-03 04:14:10.193289',1,7.500,'2026-02-06','','',0.000,'credit','paid',NULL,1,0.000,0.00,0.000,0.000), +(16,7.500,0.000,'2026-02-03 04:14:21.916188',1,7.500,'2026-02-06','','',0.000,'credit','paid',NULL,1,0.000,0.00,0.000,0.000), +(17,7.500,0.000,'2026-02-03 04:16:49.324599',1,7.500,'2026-02-05','','',0.000,'credit','unpaid',NULL,1,0.000,0.00,0.000,0.000), +(18,55.000,0.000,'2026-02-03 05:59:41.739213',2,0.000,NULL,'','',55.000,'cash','paid',NULL,1,0.000,0.00,0.000,0.000), +(19,2.500,0.000,'2026-02-03 06:07:24.440091',2,0.000,NULL,'','',2.500,'cash','paid',NULL,1,0.000,0.00,0.000,0.000), +(20,1002.950,0.000,'2026-02-05 12:53:16.871840',2,1002.950,NULL,'','',0.000,'credit','unpaid',NULL,1,0.000,0.00,0.000,0.000), +(21,1.523,0.000,'2026-02-05 13:09:39.079339',NULL,0.000,NULL,'','',1.523,'cash','paid',NULL,1,0.000,0.00,1.450,0.073), +(22,3.885,0.000,'2026-02-06 07:17:38.945627',NULL,0.000,NULL,'','',3.885,'cash','paid',NULL,1,0.000,0.00,3.700,0.185), +(23,1.523,0.000,'2026-02-06 07:46:49.365301',NULL,0.000,NULL,'','',1.523,'cash','paid',NULL,1,0.000,0.00,1.450,0.073), +(24,2.500,0.000,'2026-02-10 03:04:15.881344',NULL,0.000,NULL,'','',2.500,'cash','paid',NULL,1,0.000,0.00,2.500,0.000), +(25,2.500,0.000,'2026-02-10 03:08:51.899457',1,0.000,NULL,'','',2.500,'cash','paid',NULL,1,0.000,0.00,2.500,0.000), +(26,26.250,0.000,'2026-02-10 15:17:49.692758',2,0.000,NULL,'','',26.250,'cash','paid',NULL,1,0.000,0.00,25.000,1.250); +/*!40000 ALTER TABLE `core_sale` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `core_saleitem` +-- + +DROP TABLE IF EXISTS `core_saleitem`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `core_saleitem` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `quantity` decimal(15,2) NOT NULL, + `unit_price` decimal(12,3) NOT NULL, + `line_total` decimal(15,3) NOT NULL, + `product_id` bigint(20) NOT NULL, + `sale_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + KEY `core_saleitem_product_id_2972cee0_fk_core_product_id` (`product_id`), + KEY `core_saleitem_sale_id_ac8b60ae_fk_core_sale_id` (`sale_id`), + CONSTRAINT `core_saleitem_product_id_2972cee0_fk_core_product_id` FOREIGN KEY (`product_id`) REFERENCES `core_product` (`id`), + CONSTRAINT `core_saleitem_sale_id_ac8b60ae_fk_core_sale_id` FOREIGN KEY (`sale_id`) REFERENCES `core_sale` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=41 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `core_saleitem` +-- + +LOCK TABLES `core_saleitem` WRITE; +/*!40000 ALTER TABLE `core_saleitem` DISABLE KEYS */; +INSERT INTO `core_saleitem` VALUES +(1,1.00,1499.000,1499.000,2,1), +(2,2.00,2.500,5.000,3,1), +(3,2.00,999.000,1998.000,1,1), +(4,1.00,2.500,2.500,3,2), +(5,1.00,1499.000,1499.000,2,2), +(6,3.00,999.000,2997.000,1,2), +(7,1.00,2.500,2.500,3,3), +(8,1.00,1499.000,1499.000,2,3), +(9,3.00,999.000,2997.000,1,3), +(10,1.00,2.500,2.500,3,4), +(11,1.00,1499.000,1499.000,2,4), +(12,1.00,999.000,999.000,1,4), +(13,1.00,999.000,999.000,1,5), +(14,1.00,999.000,999.000,1,6), +(15,1.00,1499.000,1499.000,2,6), +(16,1.00,2.500,2.500,3,6), +(17,1.00,2.500,2.500,3,7), +(18,1.00,999.000,999.000,1,7), +(19,2.00,2.500,5.000,3,8), +(20,2.00,999.000,1998.000,1,8), +(21,1.00,2.500,2.500,3,9), +(22,2.00,2.500,5.000,3,10), +(23,1.00,2.500,2.500,3,11), +(24,5.00,2.500,12.500,3,12), +(25,3.00,2.500,7.500,3,17), +(26,22.00,2.500,55.000,3,18), +(27,1.00,2.500,2.500,3,19), +(28,1.00,999.000,999.000,1,20), +(29,1.00,2.500,2.500,3,20), +(30,1.00,1.200,1.200,4,20), +(31,1.00,0.250,0.250,5,20), +(32,1.00,1.200,1.200,4,21), +(33,1.00,0.250,0.250,5,21), +(34,1.00,2.500,2.500,3,22), +(35,1.00,1.200,1.200,4,22), +(36,1.00,0.250,0.250,5,23), +(37,1.00,1.200,1.200,4,23), +(38,1.00,2.500,2.500,3,24), +(39,1.00,2.500,2.500,3,25), +(40,10.00,2.500,25.000,3,26); +/*!40000 ALTER TABLE `core_saleitem` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `core_salepayment` +-- + +DROP TABLE IF EXISTS `core_salepayment`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `core_salepayment` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `amount` decimal(15,3) NOT NULL, + `payment_date` date NOT NULL, + `payment_method_id` bigint(20) DEFAULT NULL, + `notes` longtext NOT NULL, + `sale_id` bigint(20) NOT NULL, + `created_by_id` int(11) DEFAULT NULL, + `payment_method_name` varchar(50) NOT NULL, + `created_at` datetime(6) NOT NULL, + PRIMARY KEY (`id`), + KEY `core_salepayment_sale_id_7de9b2ea_fk_core_sale_id` (`sale_id`), + KEY `core_salepayment_created_by_id_13527d07_fk_auth_user_id` (`created_by_id`), + KEY `core_salepayment_payment_method_id_1520e412` (`payment_method_id`), + CONSTRAINT `core_salepayment_created_by_id_13527d07_fk_auth_user_id` FOREIGN KEY (`created_by_id`) REFERENCES `auth_user` (`id`), + CONSTRAINT `core_salepayment_payment_method_id_1520e412_fk_core_paym` FOREIGN KEY (`payment_method_id`) REFERENCES `core_paymentmethod` (`id`), + CONSTRAINT `core_salepayment_sale_id_7de9b2ea_fk_core_sale_id` FOREIGN KEY (`sale_id`) REFERENCES `core_sale` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `core_salepayment` +-- + +LOCK TABLES `core_salepayment` WRITE; +/*!40000 ALTER TABLE `core_salepayment` DISABLE KEYS */; +INSERT INTO `core_salepayment` VALUES +(1,2.500,'2026-02-02',1,'Initial payment',9,1,'Cash','2026-02-07 11:42:08.140968'), +(2,5.000,'2026-02-02',1,'Initial payment',10,1,'Cash','2026-02-07 11:42:08.140968'), +(3,2.500,'2026-02-03',1,'',11,1,'Cash','2026-02-07 11:42:08.140968'), +(4,5.000,'2026-02-03',1,'Initial payment',12,1,'Cash','2026-02-07 11:42:08.140968'), +(5,55.000,'2026-02-03',1,'Initial payment',18,1,'Cash','2026-02-07 11:42:08.140968'), +(6,2.500,'2026-02-03',1,'Initial payment',19,1,'Cash','2026-02-07 11:42:08.140968'), +(7,1.523,'2026-02-05',1,'Initial payment',21,1,'Cash','2026-02-07 11:42:08.140968'), +(8,3.885,'2026-02-06',1,'Initial payment',22,1,'Cash','2026-02-07 11:42:08.140968'), +(9,1.523,'2026-02-06',1,'Initial payment',23,1,'Cash','2026-02-07 11:42:08.140968'), +(10,2.500,'2026-02-10',1,'',24,1,'Cash','2026-02-10 03:04:16.058720'), +(11,2.500,'2026-02-10',1,'',25,1,'Cash','2026-02-10 03:08:51.920026'), +(12,26.250,'2026-02-10',2,'',26,1,'Cash','2026-02-10 15:17:49.991630'); +/*!40000 ALTER TABLE `core_salepayment` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `core_salereturn` +-- + +DROP TABLE IF EXISTS `core_salereturn`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `core_salereturn` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `return_number` varchar(50) NOT NULL, + `total_amount` decimal(15,3) NOT NULL, + `notes` longtext NOT NULL, + `created_at` datetime(6) NOT NULL, + `customer_id` bigint(20) DEFAULT NULL, + `sale_id` bigint(20) DEFAULT NULL, + `created_by_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `core_salereturn_customer_id_e743045f_fk_core_customer_id` (`customer_id`), + KEY `core_salereturn_sale_id_8e308520_fk_core_sale_id` (`sale_id`), + KEY `core_salereturn_created_by_id_ed5c0847_fk_auth_user_id` (`created_by_id`), + CONSTRAINT `core_salereturn_created_by_id_ed5c0847_fk_auth_user_id` FOREIGN KEY (`created_by_id`) REFERENCES `auth_user` (`id`), + CONSTRAINT `core_salereturn_customer_id_e743045f_fk_core_customer_id` FOREIGN KEY (`customer_id`) REFERENCES `core_customer` (`id`), + CONSTRAINT `core_salereturn_sale_id_8e308520_fk_core_sale_id` FOREIGN KEY (`sale_id`) REFERENCES `core_sale` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `core_salereturn` +-- + +LOCK TABLES `core_salereturn` WRITE; +/*!40000 ALTER TABLE `core_salereturn` DISABLE KEYS */; +INSERT INTO `core_salereturn` VALUES +(1,'',25.000,'','2026-02-02 10:06:16.347804',NULL,4,NULL); +/*!40000 ALTER TABLE `core_salereturn` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `core_salereturnitem` +-- + +DROP TABLE IF EXISTS `core_salereturnitem`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `core_salereturnitem` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `quantity` decimal(15,2) NOT NULL, + `unit_price` decimal(12,3) NOT NULL, + `line_total` decimal(15,3) NOT NULL, + `product_id` bigint(20) NOT NULL, + `sale_return_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + KEY `core_salereturnitem_product_id_173abfff_fk_core_product_id` (`product_id`), + KEY `core_salereturnitem_sale_return_id_f00a0503_fk_core_sale` (`sale_return_id`), + CONSTRAINT `core_salereturnitem_product_id_173abfff_fk_core_product_id` FOREIGN KEY (`product_id`) REFERENCES `core_product` (`id`), + CONSTRAINT `core_salereturnitem_sale_return_id_f00a0503_fk_core_sale` FOREIGN KEY (`sale_return_id`) REFERENCES `core_salereturn` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `core_salereturnitem` +-- + +LOCK TABLES `core_salereturnitem` WRITE; +/*!40000 ALTER TABLE `core_salereturnitem` DISABLE KEYS */; +INSERT INTO `core_salereturnitem` VALUES +(1,10.00,2.500,25.000,3,1); +/*!40000 ALTER TABLE `core_salereturnitem` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `core_supplier` +-- + +DROP TABLE IF EXISTS `core_supplier`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `core_supplier` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name` varchar(200) NOT NULL, + `contact_person` varchar(200) NOT NULL, + `phone` varchar(20) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `core_supplier` +-- + +LOCK TABLES `core_supplier` WRITE; +/*!40000 ALTER TABLE `core_supplier` DISABLE KEYS */; +INSERT INTO `core_supplier` VALUES +(1,'CASH','CASH','123'), +(2,'Milk Compant','milk man','1234'); +/*!40000 ALTER TABLE `core_supplier` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `core_systemsetting` +-- + +DROP TABLE IF EXISTS `core_systemsetting`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `core_systemsetting` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `business_name` varchar(200) NOT NULL, + `address` longtext NOT NULL, + `phone` varchar(20) NOT NULL, + `email` varchar(254) NOT NULL, + `currency_symbol` varchar(10) NOT NULL, + `tax_rate` decimal(5,2) NOT NULL, + `logo` varchar(100) DEFAULT NULL, + `registration_number` varchar(50) NOT NULL, + `vat_number` varchar(50) NOT NULL, + `decimal_places` smallint(5) unsigned NOT NULL CHECK (`decimal_places` >= 0), + `currency_per_point` decimal(10,3) NOT NULL, + `loyalty_enabled` tinyint(1) NOT NULL, + `min_points_to_redeem` int(10) unsigned NOT NULL CHECK (`min_points_to_redeem` >= 0), + `points_per_currency` decimal(10,2) NOT NULL, + `wablas_enabled` tinyint(1) NOT NULL, + `wablas_server_url` varchar(200) NOT NULL, + `wablas_token` varchar(255) NOT NULL, + `wablas_secret_key` varchar(255) NOT NULL, + `allow_zero_stock_sales` tinyint(1) NOT NULL, + `favicon` varchar(100) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `core_systemsetting` +-- + +LOCK TABLES `core_systemsetting` WRITE; +/*!40000 ALTER TABLE `core_systemsetting` DISABLE KEYS */; +INSERT INTO `core_systemsetting` VALUES +(1,'Meezan Accounting ميزان','AL Hamra\r\nSultanate of Oman','99359472','aalabry@gmail.com','OMR',5.00,'business_logos/albidar-logo.jpg','89989665','Om9787',3,0.010,0,100,1.00,1,'https://deu.wablas.com/','xOSMYzXiM9uABP0zcoALzlGJjKsRBaLCS2paBAE2kyECNNJkCQbgMW8','X9aUy0K2',1,''); +/*!40000 ALTER TABLE `core_systemsetting` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `core_unit` +-- + +DROP TABLE IF EXISTS `core_unit`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `core_unit` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name_en` varchar(50) NOT NULL, + `name_ar` varchar(50) NOT NULL, + `short_name` varchar(10) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `core_unit` +-- + +LOCK TABLES `core_unit` WRITE; +/*!40000 ALTER TABLE `core_unit` DISABLE KEYS */; +INSERT INTO `core_unit` VALUES +(1,'box','كرتون','ctn'), +(2,'sack','جونية','sack'); +/*!40000 ALTER TABLE `core_unit` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `core_userprofile` +-- + +DROP TABLE IF EXISTS `core_userprofile`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `core_userprofile` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `image` varchar(100) DEFAULT NULL, + `phone` varchar(20) NOT NULL, + `bio` longtext NOT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `user_id` (`user_id`), + CONSTRAINT `core_userprofile_user_id_5141ad90_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `core_userprofile` +-- + +LOCK TABLES `core_userprofile` WRITE; +/*!40000 ALTER TABLE `core_userprofile` DISABLE KEYS */; +INSERT INTO `core_userprofile` VALUES +(1,'profile_pics/meezan.png','99359472','Impowring Ai',1), +(2,'','','',2); +/*!40000 ALTER TABLE `core_userprofile` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `django_admin_log` +-- + +DROP TABLE IF EXISTS `django_admin_log`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `django_admin_log` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `action_time` datetime(6) NOT NULL, + `object_id` longtext DEFAULT NULL, + `object_repr` varchar(200) NOT NULL, + `action_flag` smallint(5) unsigned NOT NULL CHECK (`action_flag` >= 0), + `change_message` longtext NOT NULL, + `content_type_id` int(11) DEFAULT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `django_admin_log_content_type_id_c4bce8eb_fk_django_co` (`content_type_id`), + KEY `django_admin_log_user_id_c564eba6_fk_auth_user_id` (`user_id`), + CONSTRAINT `django_admin_log_content_type_id_c4bce8eb_fk_django_co` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`), + CONSTRAINT `django_admin_log_user_id_c564eba6_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `django_admin_log` +-- + +LOCK TABLES `django_admin_log` WRITE; +/*!40000 ALTER TABLE `django_admin_log` DISABLE KEYS */; +/*!40000 ALTER TABLE `django_admin_log` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `django_content_type` +-- + +DROP TABLE IF EXISTS `django_content_type`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `django_content_type` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `app_label` varchar(100) NOT NULL, + `model` varchar(100) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `django_content_type_app_label_model_76bd3d3b_uniq` (`app_label`,`model`) +) ENGINE=InnoDB AUTO_INCREMENT=46 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `django_content_type` +-- + +LOCK TABLES `django_content_type` WRITE; +/*!40000 ALTER TABLE `django_content_type` DISABLE KEYS */; +INSERT INTO `django_content_type` VALUES +(32,'accounting','account'), +(34,'accounting','journalentry'), +(33,'accounting','journalitem'), +(1,'admin','logentry'), +(3,'auth','group'), +(2,'auth','permission'), +(4,'auth','user'), +(5,'contenttypes','contenttype'), +(44,'core','cashiercounterregistry'), +(45,'core','cashiersession'), +(11,'core','category'), +(9,'core','customer'), +(35,'core','device'), +(31,'core','expense'), +(30,'core','expensecategory'), +(26,'core','heldsale'), +(27,'core','loyaltytier'), +(28,'core','loyaltytransaction'), +(25,'core','paymentmethod'), +(10,'core','product'), +(12,'core','purchase'), +(16,'core','purchaseitem'), +(42,'core','purchaseorder'), +(43,'core','purchaseorderitem'), +(17,'core','purchasepayment'), +(23,'core','purchasereturn'), +(22,'core','purchasereturnitem'), +(19,'core','quotation'), +(20,'core','quotationitem'), +(8,'core','sale'), +(7,'core','saleitem'), +(18,'core','salepayment'), +(24,'core','salereturn'), +(21,'core','salereturnitem'), +(13,'core','supplier'), +(14,'core','systemsetting'), +(15,'core','unit'), +(29,'core','userprofile'), +(40,'hr','attendance'), +(41,'hr','biometricdevice'), +(37,'hr','department'), +(38,'hr','employee'), +(39,'hr','jobposition'), +(36,'hr','leaverequest'), +(6,'sessions','session'); +/*!40000 ALTER TABLE `django_content_type` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `django_migrations` +-- + +DROP TABLE IF EXISTS `django_migrations`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `django_migrations` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `app` varchar(255) NOT NULL, + `name` varchar(255) NOT NULL, + `applied` datetime(6) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=59 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `django_migrations` +-- + +LOCK TABLES `django_migrations` WRITE; +/*!40000 ALTER TABLE `django_migrations` DISABLE KEYS */; +INSERT INTO `django_migrations` VALUES +(1,'contenttypes','0001_initial','2026-02-02 06:49:07.912210'), +(2,'auth','0001_initial','2026-02-02 06:49:08.235725'), +(3,'admin','0001_initial','2026-02-02 06:49:08.292220'), +(4,'admin','0002_logentry_remove_auto_add','2026-02-02 06:49:08.301397'), +(5,'admin','0003_logentry_add_action_flag_choices','2026-02-02 06:49:08.308923'), +(6,'contenttypes','0002_remove_content_type_name','2026-02-02 06:49:08.361275'), +(7,'auth','0002_alter_permission_name_max_length','2026-02-02 06:49:08.387045'), +(8,'auth','0003_alter_user_email_max_length','2026-02-02 06:49:08.405049'), +(9,'auth','0004_alter_user_username_opts','2026-02-02 06:49:08.412944'), +(10,'auth','0005_alter_user_last_login_null','2026-02-02 06:49:08.442097'), +(11,'auth','0006_require_contenttypes_0002','2026-02-02 06:49:08.443714'), +(12,'auth','0007_alter_validators_add_error_messages','2026-02-02 06:49:08.452180'), +(13,'auth','0008_alter_user_username_max_length','2026-02-02 06:49:08.470808'), +(14,'auth','0009_alter_user_last_name_max_length','2026-02-02 06:49:08.490849'), +(15,'auth','0010_alter_group_name_max_length','2026-02-02 06:49:08.512411'), +(16,'auth','0011_update_proxy_permissions','2026-02-02 06:49:08.520197'), +(17,'auth','0012_alter_user_first_name_max_length','2026-02-02 06:49:08.536568'), +(18,'sessions','0001_initial','2026-02-02 06:49:08.559495'), +(19,'core','0001_initial','2026-02-02 06:51:03.071552'), +(20,'core','0002_systemsetting','2026-02-02 07:30:57.561607'), +(21,'core','0003_remove_systemsetting_logo_url_systemsetting_logo_and_more','2026-02-02 07:45:31.000870'), +(22,'core','0004_unit_product_unit','2026-02-02 08:00:56.833598'), +(23,'core','0005_product_cost_price_product_is_active_and_more','2026-02-02 08:19:07.538487'), +(24,'core','0006_purchase_balance_due_purchase_due_date_and_more','2026-02-02 08:35:37.214125'), +(25,'core','0007_sale_balance_due_sale_due_date_sale_invoice_number_and_more','2026-02-02 09:25:10.910859'), +(26,'core','0008_quotation_sale_quotation_quotationitem','2026-02-02 09:49:51.308605'), +(27,'core','0009_purchasereturn_purchasereturnitem_salereturn_and_more','2026-02-02 10:00:16.080058'), +(28,'core','0010_purchase_created_by_purchasepayment_created_by_and_more','2026-02-02 10:42:50.867159'), +(29,'core','0011_paymentmethod_purchasepayment_payment_method_name_and_more','2026-02-02 13:01:26.482934'), +(30,'core','0012_systemsetting_decimal_places','2026-02-02 16:12:15.020628'), +(31,'core','0013_heldsale','2026-02-02 16:38:01.073610'), +(32,'core','0014_loyaltytier_customer_loyalty_points_and_more','2026-02-02 16:46:31.143004'), +(33,'core','0015_userprofile','2026-02-02 16:58:21.008349'), +(34,'core','0016_expensecategory_expense','2026-02-02 17:15:25.966752'), +(35,'accounting','0001_initial','2026-02-03 03:14:20.937223'), +(36,'core','0017_expensecategory_accounting_account','2026-02-03 03:14:37.645069'), +(37,'core','0018_systemsetting_wablas_enabled_and_more','2026-02-03 05:18:13.674695'), +(38,'core','0019_systemsetting_wablas_secret_key','2026-02-03 05:22:33.198364'), +(39,'core','0020_product_expiry_date_product_has_expiry_and_more','2026-02-03 10:08:01.848192'), +(40,'core','0021_product_min_stock_level','2026-02-03 10:19:48.705500'), +(41,'core','0022_alter_product_min_stock_level_and_more','2026-02-03 10:27:58.553728'), +(42,'core','0023_alter_product_min_stock_level_and_more','2026-02-03 10:33:19.757774'), +(43,'core','0024_device','2026-02-05 12:23:02.789348'), +(44,'core','0025_sale_subtotal_sale_vat_amount','2026-02-05 12:58:10.107851'), +(45,'hr','0001_initial','2026-02-05 13:13:35.326996'), +(46,'hr','0002_biometricdevice_attendance_device','2026-02-05 13:23:07.085993'), +(47,'hr','0003_employee_biometric_id_and_more','2026-02-05 13:31:49.326558'), +(48,'core','0026_purchaseorder_purchase_purchase_order_and_more','2026-02-06 05:46:03.069331'), +(49,'core','0027_alter_device_device_type_cashiercounterregistry','2026-02-06 06:36:45.276943'), +(50,'core','0028_cashiersession','2026-02-06 07:28:55.816569'), +(51,'core','0029_systemsetting_allow_zero_stock_sales','2026-02-07 11:38:47.450830'), +(52,'core','0030_salepayment_created_at_purchasepayment_created_at','2026-02-07 11:42:09.151391'), +(53,'core','0031_create_superuser','2026-02-09 19:13:50.909885'), +(54,'core','0032_product_is_service','2026-02-09 19:13:50.963280'), +(55,'core','0033_auto_add_is_service','2026-02-10 14:30:42.074627'), +(57,'core','0034_systemsetting_favicon','2026-02-10 15:08:05.592707'), +(58,'core','0035_remove_heldsale_customer_remove_heldsale_notes_and_more','2026-02-11 08:39:30.985101'); +/*!40000 ALTER TABLE `django_migrations` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `django_session` +-- + +DROP TABLE IF EXISTS `django_session`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `django_session` ( + `session_key` varchar(40) NOT NULL, + `session_data` longtext NOT NULL, + `expire_date` datetime(6) NOT NULL, + PRIMARY KEY (`session_key`), + KEY `django_session_expire_date_a5c62663` (`expire_date`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `django_session` +-- + +LOCK TABLES `django_session` WRITE; +/*!40000 ALTER TABLE `django_session` DISABLE KEYS */; +INSERT INTO `django_session` VALUES +('0wecnzgpwsm956532sae9kv7jv6uz0ed','.eJxVjEEOwiAQRe_C2hBmClRcuu8ZyACDVA0kpV0Z765NutDtf-_9l_C0rcVvnRc_J3ERIE6_W6D44LqDdKd6azK2ui5zkLsiD9rl1BI_r4f7d1Col289MmrURJAZbDYOIxhllcKAQ3YOB2OSJWRQWmEGQBoDmAzW5Hi2Lon3B7r1Nsg:1vpgdu:Yv7nqc0nZ5WIC_mHoKnzgndJjC7q8QeT6YJqiYg2FqE','2026-02-24 05:50:34.582000'), +('2m6m26g8v7ywx8vxn9kcc9pv51ej6c6v','.eJxVjMsOwiAQRf-FtSFQ3i7d-w1kmAGpGkhKuzL-uzbpQrf3nHNfLMK21riNvMSZ2JlJdvrdEuAjtx3QHdqtc-xtXebEd4UfdPBrp_y8HO7fQYVRv7UhbVUha4NSSMEKMli0tlCyIlMEWAjoQvDOJ5F1QCGkMV6SmhDF5Nj7A-LhN4M:1vpgrl:EvJWbbFzKFQFou4cSDrpzkTqtxJod4uI7SEQlZWS2uI','2026-02-24 06:04:53.745861'); +/*!40000 ALTER TABLE `django_session` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `hr_attendance` +-- + +DROP TABLE IF EXISTS `hr_attendance`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `hr_attendance` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `date` date NOT NULL, + `check_in` time(6) DEFAULT NULL, + `check_out` time(6) DEFAULT NULL, + `notes` longtext NOT NULL, + `employee_id` bigint(20) NOT NULL, + `device_id` bigint(20) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `hr_attendance_employee_id_date_bb6d7969_uniq` (`employee_id`,`date`), + KEY `hr_attendance_device_id_8b496410_fk_hr_biometricdevice_id` (`device_id`), + CONSTRAINT `hr_attendance_device_id_8b496410_fk_hr_biometricdevice_id` FOREIGN KEY (`device_id`) REFERENCES `hr_biometricdevice` (`id`), + CONSTRAINT `hr_attendance_employee_id_7ed1b344_fk_hr_employee_id` FOREIGN KEY (`employee_id`) REFERENCES `hr_employee` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `hr_attendance` +-- + +LOCK TABLES `hr_attendance` WRITE; +/*!40000 ALTER TABLE `hr_attendance` DISABLE KEYS */; +/*!40000 ALTER TABLE `hr_attendance` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `hr_biometricdevice` +-- + +DROP TABLE IF EXISTS `hr_biometricdevice`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `hr_biometricdevice` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL, + `ip_address` char(39) NOT NULL, + `port` int(10) unsigned NOT NULL CHECK (`port` >= 0), + `device_type` varchar(20) NOT NULL, + `status` varchar(20) NOT NULL, + `last_sync` datetime(6) DEFAULT NULL, + `created_at` datetime(6) NOT NULL, + `updated_at` datetime(6) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `hr_biometricdevice` +-- + +LOCK TABLES `hr_biometricdevice` WRITE; +/*!40000 ALTER TABLE `hr_biometricdevice` DISABLE KEYS */; +/*!40000 ALTER TABLE `hr_biometricdevice` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `hr_department` +-- + +DROP TABLE IF EXISTS `hr_department`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `hr_department` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name_en` varchar(100) NOT NULL, + `name_ar` varchar(100) NOT NULL, + `description` longtext NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `hr_department` +-- + +LOCK TABLES `hr_department` WRITE; +/*!40000 ALTER TABLE `hr_department` DISABLE KEYS */; +/*!40000 ALTER TABLE `hr_department` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `hr_employee` +-- + +DROP TABLE IF EXISTS `hr_employee`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `hr_employee` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `first_name` varchar(100) NOT NULL, + `last_name` varchar(100) NOT NULL, + `email` varchar(254) NOT NULL, + `phone` varchar(20) NOT NULL, + `gender` varchar(1) NOT NULL, + `hire_date` date NOT NULL, + `salary` decimal(10,2) NOT NULL, + `status` varchar(20) NOT NULL, + `address` longtext NOT NULL, + `date_of_birth` date DEFAULT NULL, + `created_at` datetime(6) NOT NULL, + `updated_at` datetime(6) NOT NULL, + `department_id` bigint(20) DEFAULT NULL, + `user_id` int(11) DEFAULT NULL, + `job_position_id` bigint(20) DEFAULT NULL, + `biometric_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `email` (`email`), + UNIQUE KEY `user_id` (`user_id`), + KEY `hr_employee_job_position_id_8e9e3995_fk_hr_jobposition_id` (`job_position_id`), + KEY `hr_employee_department_id_0bf585c1_fk_hr_department_id` (`department_id`), + CONSTRAINT `hr_employee_department_id_0bf585c1_fk_hr_department_id` FOREIGN KEY (`department_id`) REFERENCES `hr_department` (`id`), + CONSTRAINT `hr_employee_job_position_id_8e9e3995_fk_hr_jobposition_id` FOREIGN KEY (`job_position_id`) REFERENCES `hr_jobposition` (`id`), + CONSTRAINT `hr_employee_user_id_0b2d424f_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `hr_employee` +-- + +LOCK TABLES `hr_employee` WRITE; +/*!40000 ALTER TABLE `hr_employee` DISABLE KEYS */; +/*!40000 ALTER TABLE `hr_employee` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `hr_jobposition` +-- + +DROP TABLE IF EXISTS `hr_jobposition`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `hr_jobposition` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `title_en` varchar(100) NOT NULL, + `title_ar` varchar(100) NOT NULL, + `department_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + KEY `hr_jobposition_department_id_e1795bfd_fk_hr_department_id` (`department_id`), + CONSTRAINT `hr_jobposition_department_id_e1795bfd_fk_hr_department_id` FOREIGN KEY (`department_id`) REFERENCES `hr_department` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `hr_jobposition` +-- + +LOCK TABLES `hr_jobposition` WRITE; +/*!40000 ALTER TABLE `hr_jobposition` DISABLE KEYS */; +/*!40000 ALTER TABLE `hr_jobposition` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `hr_leaverequest` +-- + +DROP TABLE IF EXISTS `hr_leaverequest`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `hr_leaverequest` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `leave_type` varchar(20) NOT NULL, + `start_date` date NOT NULL, + `end_date` date NOT NULL, + `reason` longtext NOT NULL, + `status` varchar(20) NOT NULL, + `created_at` datetime(6) NOT NULL, + `approved_by_id` int(11) DEFAULT NULL, + `employee_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + KEY `hr_leaverequest_approved_by_id_1584e857_fk_auth_user_id` (`approved_by_id`), + KEY `hr_leaverequest_employee_id_7b0019ae_fk_hr_employee_id` (`employee_id`), + CONSTRAINT `hr_leaverequest_approved_by_id_1584e857_fk_auth_user_id` FOREIGN KEY (`approved_by_id`) REFERENCES `auth_user` (`id`), + CONSTRAINT `hr_leaverequest_employee_id_7b0019ae_fk_hr_employee_id` FOREIGN KEY (`employee_id`) REFERENCES `hr_employee` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `hr_leaverequest` +-- + +LOCK TABLES `hr_leaverequest` WRITE; +/*!40000 ALTER TABLE `hr_leaverequest` DISABLE KEYS */; +/*!40000 ALTER TABLE `hr_leaverequest` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2026-02-11 9:42:45