-- MySQL dump 10.13  Distrib 9.5.0, for macos15.4 (arm64)
--
-- Host: 194.59.214.243    Database: psp
-- ------------------------------------------------------
-- Server version	8.0.45

/*!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 */;
/*!50503 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 */;

--
-- Current Database: `psp`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `psp` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;

USE `psp`;

--
-- Table structure for table `_prisma_migrations`
--

DROP TABLE IF EXISTS `_prisma_migrations`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `_prisma_migrations` (
  `id` varchar(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `checksum` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,
  `finished_at` datetime(3) DEFAULT NULL,
  `migration_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `logs` text COLLATE utf8mb4_unicode_ci,
  `rolled_back_at` datetime(3) DEFAULT NULL,
  `started_at` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
  `applied_steps_count` int unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `_prisma_migrations`
--

LOCK TABLES `_prisma_migrations` WRITE;
/*!40000 ALTER TABLE `_prisma_migrations` DISABLE KEYS */;
INSERT INTO `_prisma_migrations` VALUES ('1108a09e-549b-4005-9689-98cba940a709','ee9ebde408feab2873611eddfd07bbda9368b20b96273c874d9b4517d3faa56c','2026-04-23 12:44:58.496','20260416125205_init',NULL,NULL,'2026-04-23 12:44:55.151',1),('3541b09f-3669-4f35-a3e3-911057c67e03','5a112a51f306dea0700821a4a83dc9501877055f74328b058618d2fe233e13bb','2026-04-23 16:43:42.282','20260423164340_init',NULL,NULL,'2026-04-23 16:43:40.920',1),('477cf4ee-172f-4404-acb1-f20091de1318','3ac42b4fc3adb21ad76e4e4840e063d1a87133ea781458bde858f7191a7de84e','2026-04-23 12:47:28.831','20260423124719_init',NULL,NULL,'2026-04-23 12:47:19.866',1),('4ed5ba10-2560-44a7-9532-1ce565a5d46b','7e1b0fe4e68b0cd96acbfad7cc5e24e9f950b3f7127c14c8fc0537e445bc170a','2026-04-23 12:44:50.203','20260415113308_init',NULL,NULL,'2026-04-23 12:44:49.433',1),('568c2102-f31a-4caa-a812-f148cc3cec01','91a62b1feba2d5523af07ab99220b1d16b1f829b7c0f1d32dfbbc33a24a227ef','2026-04-24 15:41:07.863','20260424154103_init',NULL,NULL,'2026-04-24 15:41:03.334',1),('6a798168-272b-4bce-805d-63dbedf01671','0825c1eb311bbe206a0860013857b233eb1d6815f273f43ec31e6ca6a1ca6798','2026-04-26 15:33:15.375','20260426143218_init',NULL,NULL,'2026-04-26 15:33:11.443',1),('6ff68053-ba7e-4b28-8686-66fa22351fec','4e1dd6ff9dbc1e444bc81c75ec1f33af765fdf9883b6d35909b1376f625b2307','2026-04-23 23:26:24.979','20260423232622_init',NULL,NULL,'2026-04-23 23:26:22.722',1),('7182a21f-b443-46ed-9cb4-fdae9d3b3962','8556f73f0381b5fc6cce88a1863b43472bfdc679679931eecaeede0337cf5712','2026-04-23 21:49:58.970','20260423214958_init',NULL,NULL,'2026-04-23 21:49:58.469',1),('74bde740-5c8c-400f-9f88-6041f8ff5390','40f854bad9fa0aab0c217fa20a9460060dc97abd2afe2bad3e5bf96aea629eed','2026-04-24 16:17:29.634','20260424161725_init',NULL,NULL,'2026-04-24 16:17:26.165',1),('7ae5b147-8213-46c4-a7ff-b9ebc10ad60a','a72f62b8d630960939698b0274eb0299c7176709aaa2c38307a33d56a3e934d0','2026-04-23 12:45:06.014','20260422201806_init',NULL,NULL,'2026-04-23 12:45:05.411',1),('82058c73-a09c-4359-9f86-311cd8189578','b402755a3286415fc2bc4222eb2985e7a9c57589087d9eb3ec7a53ceff93d9b2','2026-04-23 12:45:02.405','20260421131918_init',NULL,NULL,'2026-04-23 12:45:01.280',1),('87642cbe-ce89-4c6d-a2bb-5fbf49e8ad5a','2cc65b76a60988ff06b1f416324b0255dbfca4b0ff1aae548bdb177c7ed07ea1','2026-04-26 16:26:19.315','20260426153449_init',NULL,NULL,'2026-04-26 16:26:15.831',1),('8cea4939-145e-41ae-bb11-58aa28a3e6ee','167122e74dcee71d32ebbef0aac309d1af64102b7ec55243d003357716ead54e','2026-04-25 07:50:50.757','20260425075045_init',NULL,NULL,'2026-04-25 07:50:45.993',1),('9877046c-94c9-45ba-8267-febaedf3e044','1635987bbb82eac80c0466d25345f272272dff555e44eaa3a116fae9a92c1fb1','2026-04-23 12:44:43.161','20260410112847_init',NULL,NULL,'2026-04-23 12:44:07.094',1),('a033038d-a40b-48ff-b51b-aea3bd6891fa','96b6d0c1c58fcc02fb880e952d9cc2f212939aacda09cc1b385c290647441d9b','2026-04-23 12:44:55.118','20260416100419_init',NULL,NULL,'2026-04-23 12:44:50.250',1),('a0bb816e-7f01-4a7a-a3bc-9dc9ecbe7762','0dd8abc36bf573eaf474a0a7e00197d233a5191c386f801df2da798259cc14c0','2026-04-26 07:17:57.244','20260426071752_init',NULL,NULL,'2026-04-26 07:17:52.782',1),('bc3e2fd6-32b1-4815-a9e3-e53937136c7d','5571ff74b6b77590d9caa561b69d585cad1dcc659948e95d2aaafb59c4aa48f3','2026-04-23 12:45:01.225','20260420124725_add_tracking_code_to_charged_license_transactions',NULL,NULL,'2026-04-23 12:44:58.544',1),('c49c2327-7e41-4051-9c06-9ec8335e2130','43ff604ffd0cb65080a8339360db76cb0e7862725280429278e2e4660be6b9d9','2026-04-23 12:44:49.392','20260410211433_init',NULL,NULL,'2026-04-23 12:44:43.327',1),('c6c41010-5e11-4648-a19c-6ad04cd669fd','c715277bc53a127bbd2028f4916187229caeb9093103a89bf1bb3953ce5bb049','2026-04-23 12:45:05.364','20260422200730_init',NULL,NULL,'2026-04-23 12:45:02.436',1);
/*!40000 ALTER TABLE `_prisma_migrations` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `accounts`
--

DROP TABLE IF EXISTS `accounts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `accounts` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `username` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `password` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` enum('ACTIVE','SUSPENDED') COLLATE utf8mb4_unicode_ci NOT NULL,
  `type` enum('ADMIN','PROVIDER','PARTNER','CONSUMER') COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `accounts_username_key` (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `accounts`
--

LOCK TABLES `accounts` WRITE;
/*!40000 ALTER TABLE `accounts` DISABLE KEYS */;
INSERT INTO `accounts` VALUES ('01KPX63KJFQTM95S4ACQQV8NJT','superAdmin','$2b$10$/oEp78p.lw90yaItLgDm6uj0rH5GHeQAc5QhDXQt.zYZD92za9dsy','ACTIVE','ADMIN'),('01KPX63MEFBXD6E514VJJP5YJC','tis','$2b$10$XVSWjBrSalJH7QUDhuWfxOo6nhLIv.SBjzgVvvs5mvrbP.sgByCEG','ACTIVE','PARTNER'),('01KPX63V8D3BQNSVDTC1C5XQCE','zargar','$2b$10$AF2QHMNCl8HIlNRnI5s5D.fzv2v1aE0VEp2zxRfYGLf6qaEe9/ubC','ACTIVE','CONSUMER'),('01KPX63VK0ACPB3JDQV5JBCY0F','tosan','$2b$10$KC3gmQZRAxyxXcdsZ.KPDe2a3NxLGLCb9T.57viYq9XoU/IJGMb5W','ACTIVE','PROVIDER'),('01KPZEE9CNBHPD2BYQVEQ5F8KD','rahbar','$2b$10$FCuxbO/zMadwLkPjMlbd9uQJohJ.FVbeEg/fccAfxqnjsZ.a8/qr.','ACTIVE','PARTNER'),('01KQ0C2K841814NEQCMN0CVSW3','and_web','$2b$10$ak7w1SQra4Uppf6rXE/W7ehW72UhpBG5hdZGliz83Vja8g.mX5iG2','ACTIVE','CONSUMER'),('01KQ0CB5P1WQW2HD748E2SK9VC','and_sep','$2b$10$ZGoxyzAGQC4kYEjSznQ7ROdewVGBH2qa6nZAGGLsEsIezl1WkoRyq','ACTIVE','CONSUMER'),('01KQ1XPKB60G452A01V7Y5T1F0','mon_mob','$2b$10$8PxCrZWDzU/X3kdDqbzy8uz8DtBE6lYnp7ODw9aPhWViSUwkclDIi','ACTIVE','CONSUMER'),('01KQ2HF2REZPRH929E8NPCV5ZW','jafari','$2b$10$Zb73AnSz1P8FF9CzNGaXq.NyK7RkR5rRAC/YIGSzMKYc2FzxVPINK','ACTIVE','CONSUMER'),('01KQ2JB8Q1SYCRAH7K69WB62MF','ali_sep','$2b$10$skqiJZ50NcIdwEU1V6Jo.uwgHydNCAfulbOpPkZLSFT71BO0o81N2','ACTIVE','CONSUMER'),('01KQ2W7SA1KHQCATSSBVDWWQ6Z','akbar','$2b$10$.rpgUeNzHZ3wiGeqimVw8OpBeP/eIjKFwPIPn18qDOSFyKIP2UlbW','ACTIVE','CONSUMER'),('01KQ2WFMXFZBT22HWJ1VQKP4PN','akbarpos','$2b$10$RcESQgafg4fLgVIqOGy/VuBGtxQOnJ35nIkLC0s4C7B8l109u./Nm','ACTIVE','CONSUMER');
/*!40000 ALTER TABLE `accounts` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `admin_accounts`
--

DROP TABLE IF EXISTS `admin_accounts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `admin_accounts` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL,
  `admin_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `account_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `admin_accounts_account_id_key` (`account_id`),
  KEY `admin_accounts_admin_id_fkey` (`admin_id`),
  CONSTRAINT `admin_accounts_account_id_fkey` FOREIGN KEY (`account_id`) REFERENCES `accounts` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
  CONSTRAINT `admin_accounts_admin_id_fkey` FOREIGN KEY (`admin_id`) REFERENCES `admins` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `admin_accounts`
--

LOCK TABLES `admin_accounts` WRITE;
/*!40000 ALTER TABLE `admin_accounts` DISABLE KEYS */;
INSERT INTO `admin_accounts` VALUES ('01KPX63KJZB2VNCW4J72P41SAJ','2026-04-23 12:47:45','2026-04-23 12:47:45','01KPX63KHRB9CCKBZ2VVB46B46','01KPX63KJFQTM95S4ACQQV8NJT');
/*!40000 ALTER TABLE `admin_accounts` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `admins`
--

DROP TABLE IF EXISTS `admins`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `admins` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `mobile_number` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `national_code` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `first_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `last_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `admins_mobile_number_key` (`mobile_number`),
  UNIQUE KEY `admins_national_code_key` (`national_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `admins`
--

LOCK TABLES `admins` WRITE;
/*!40000 ALTER TABLE `admins` DISABLE KEYS */;
INSERT INTO `admins` VALUES ('01KPX63KHRB9CCKBZ2VVB46B46','09120258156','0016022289','عباس','حسنی','2026-04-23 12:47:45','2026-04-23 12:47:45');
/*!40000 ALTER TABLE `admins` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `application_released_info`
--

DROP TABLE IF EXISTS `application_released_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `application_released_info` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `version` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `build_number` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `is_minimum_supported` tinyint(1) NOT NULL DEFAULT '0',
  `notes` json DEFAULT NULL,
  `release_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL,
  `platform` enum('ANDROID','IOS') COLLATE utf8mb4_unicode_ci NOT NULL,
  `release_type` enum('STABLE','BETA','ALPHA') COLLATE utf8mb4_unicode_ci 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 `application_released_info`
--

LOCK TABLES `application_released_info` WRITE;
/*!40000 ALTER TABLE `application_released_info` DISABLE KEYS */;
/*!40000 ALTER TABLE `application_released_info` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `business_activities`
--

DROP TABLE IF EXISTS `business_activities`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `business_activities` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL,
  `guild_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `consumer_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `economic_code` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `business_activities_economic_code_consumer_id_key` (`economic_code`,`consumer_id`),
  KEY `business_activities_guild_id_fkey` (`guild_id`),
  KEY `business_activities_consumer_id_fkey` (`consumer_id`),
  CONSTRAINT `business_activities_consumer_id_fkey` FOREIGN KEY (`consumer_id`) REFERENCES `consumers` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
  CONSTRAINT `business_activities_guild_id_fkey` FOREIGN KEY (`guild_id`) REFERENCES `guilds` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `business_activities`
--

LOCK TABLES `business_activities` WRITE;
/*!40000 ALTER TABLE `business_activities` DISABLE KEYS */;
INSERT INTO `business_activities` VALUES ('01KQ05Q8X0EQH4R79038WXXC19','زرگران','2026-04-24 16:38:44','2026-04-24 16:38:44','01KPX63KNQXAR1J032RVMAJ100','01KPX63V7WEFC9V5JTD0EDTG76','۲۱۳۱۲۳'),('01KQ2J44B6SF32XDKY6SZ16TB4','طلا علی','2026-04-25 14:53:57','2026-04-25 14:53:57','01KPX63KNQXAR1J032RVMAJ100','01KQ2HF2R0XCM9VKZZY2J92Z3V','۱۲۳۲۱۳'),('01KQ2K5X6AHKR119VJQB7NC4NH','تره بار','2026-04-25 15:12:24','2026-04-25 15:12:24','01KPX63KNQ3PSK1RSBJNV00PMN','01KQ2HF2R0XCM9VKZZY2J92Z3V','۱۲۳۲۱۳۱'),('01KQ2WB8XGS33DQVSW3CPH9P13','یاران دریان حجت','2026-04-25 17:52:37','2026-04-25 17:52:37','01KPX63KNQ3PSK1RSBJNV00PMN','01KQ2W7S95WEC578WCG52G4VJD','۱۰۹۸۷۴۸۲');
/*!40000 ALTER TABLE `business_activities` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `complexes`
--

DROP TABLE IF EXISTS `complexes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `complexes` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `address` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL,
  `business_activity_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `branch_code` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `complexes_business_activity_id_fkey` (`business_activity_id`),
  CONSTRAINT `complexes_business_activity_id_fkey` FOREIGN KEY (`business_activity_id`) REFERENCES `business_activities` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `complexes`
--

LOCK TABLES `complexes` WRITE;
/*!40000 ALTER TABLE `complexes` DISABLE KEYS */;
INSERT INTO `complexes` VALUES ('01KQ0866BCDC6WPSNMTB0X6MKE','شعبه‌ی اندرزگو','تهران اندرزگو','2026-04-24 17:21:50','2026-04-24 17:21:50','01KQ05Q8X0EQH4R79038WXXC19','۱۲۳۱۲۳'),('01KQ1WFH94EYY2C46YC29QR895','شعبه‌ی منیریه','تهران منیریه','2026-04-25 08:35:43','2026-04-25 08:36:41','01KQ05Q8X0EQH4R79038WXXC19','۲۴۱'),('01KQ2J6YEHGZG8GHE0DFGCFY80','طلای مرزداران','سبی','2026-04-25 14:55:30','2026-04-25 14:55:30','01KQ2J44B6SF32XDKY6SZ16TB4','۱۲'),('01KQ2WCV8D0Q1SB1A471THF096','جنت آباد جنوبی','جنت آباد','2026-04-25 17:53:29','2026-04-25 17:53:29','01KQ2WB8XGS33DQVSW3CPH9P13','۰۹۸۳');
/*!40000 ALTER TABLE `complexes` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `consumer_accounts`
--

DROP TABLE IF EXISTS `consumer_accounts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `consumer_accounts` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `role` enum('OWNER','MANAGER','OPERATOR') COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL,
  `consumer_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `account_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `consumer_accounts_account_id_key` (`account_id`),
  KEY `consumer_accounts_consumer_id_fkey` (`consumer_id`),
  CONSTRAINT `consumer_accounts_account_id_fkey` FOREIGN KEY (`account_id`) REFERENCES `accounts` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
  CONSTRAINT `consumer_accounts_consumer_id_fkey` FOREIGN KEY (`consumer_id`) REFERENCES `consumers` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `consumer_accounts`
--

LOCK TABLES `consumer_accounts` WRITE;
/*!40000 ALTER TABLE `consumer_accounts` DISABLE KEYS */;
INSERT INTO `consumer_accounts` VALUES ('01KPX63V8TSSPM3B7DM3013RD4','OWNER','2026-04-23 12:47:53','2026-04-23 12:47:53','01KPX63V7WEFC9V5JTD0EDTG76','01KPX63V8D3BQNSVDTC1C5XQCE'),('01KQ0C2K96Z64MRNFXSY1C1WKD','OPERATOR','2026-04-24 18:29:47','2026-04-24 18:29:47','01KPX63V7WEFC9V5JTD0EDTG76','01KQ0C2K841814NEQCMN0CVSW3'),('01KQ0CB5PW4BKEXR947C9ZAXVP','OPERATOR','2026-04-24 18:34:28','2026-04-24 18:34:28','01KPX63V7WEFC9V5JTD0EDTG76','01KQ0CB5P1WQW2HD748E2SK9VC'),('01KQ1XPKGJ869MHG1DHJE2PV47','OPERATOR','2026-04-25 08:57:03','2026-04-25 08:57:03','01KPX63V7WEFC9V5JTD0EDTG76','01KQ1XPKB60G452A01V7Y5T1F0'),('01KQ2HF2X05VGVHP2TZWGYAS70','OWNER','2026-04-25 14:42:28','2026-04-25 14:42:28','01KQ2HF2R0XCM9VKZZY2J92Z3V','01KQ2HF2REZPRH929E8NPCV5ZW'),('01KQ2JB8RM5AY2KM5FSZE2SF45','OPERATOR','2026-04-25 14:57:51','2026-04-25 14:57:51','01KQ2HF2R0XCM9VKZZY2J92Z3V','01KQ2JB8Q1SYCRAH7K69WB62MF'),('01KQ2W7SAJF514GQ02AZV51JB4','OWNER','2026-04-25 17:50:43','2026-04-25 17:50:43','01KQ2W7S95WEC578WCG52G4VJD','01KQ2W7SA1KHQCATSSBVDWWQ6Z'),('01KQ2WFMYZ3THXKBNMFB1EX0B9','OPERATOR','2026-04-25 17:55:01','2026-04-25 17:55:01','01KQ2W7S95WEC578WCG52G4VJD','01KQ2WFMXFZBT22HWJ1VQKP4PN');
/*!40000 ALTER TABLE `consumer_accounts` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `consumer_devices`
--

DROP TABLE IF EXISTS `consumer_devices`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `consumer_devices` (
  `uuid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `app_version` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
  `build_number` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
  `platform` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `brand` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `model` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `device` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `os_version` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
  `sdk_version` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
  `release_number` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
  `browser_name` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `fcm_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL,
  `consumer_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `publisher` enum('DIRECT','CAFE_BAZAR','MAYKET') COLLATE utf8mb4_unicode_ci NOT NULL,
  `user_agent` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`uuid`),
  UNIQUE KEY `consumer_devices_uuid_key` (`uuid`),
  KEY `consumer_devices_consumer_id_fkey` (`consumer_id`),
  CONSTRAINT `consumer_devices_consumer_id_fkey` FOREIGN KEY (`consumer_id`) REFERENCES `consumers` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `consumer_devices`
--

LOCK TABLES `consumer_devices` WRITE;
/*!40000 ALTER TABLE `consumer_devices` DISABLE KEYS */;
/*!40000 ALTER TABLE `consumer_devices` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `consumers`
--

DROP TABLE IF EXISTS `consumers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `consumers` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` enum('ACTIVE','SUSPENDED') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'ACTIVE',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL,
  `type` enum('INDIVIDUAL','LEGAL') COLLATE utf8mb4_unicode_ci 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 `consumers`
--

LOCK TABLES `consumers` WRITE;
/*!40000 ALTER TABLE `consumers` DISABLE KEYS */;
INSERT INTO `consumers` VALUES ('01KPX63V7WEFC9V5JTD0EDTG76','ACTIVE','2026-04-23 12:47:53','2026-04-23 12:47:53','INDIVIDUAL'),('01KQ2HF2R0XCM9VKZZY2J92Z3V','ACTIVE','2026-04-25 14:42:28','2026-04-25 14:42:28','INDIVIDUAL'),('01KQ2W7S95WEC578WCG52G4VJD','ACTIVE','2026-04-25 17:50:43','2026-04-25 17:50:43','INDIVIDUAL');
/*!40000 ALTER TABLE `consumers` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `consumers_individual`
--

DROP TABLE IF EXISTS `consumers_individual`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `consumers_individual` (
  `first_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `last_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `mobile_number` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `national_code` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL,
  `partner_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `consumer_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`consumer_id`),
  UNIQUE KEY `consumers_individual_mobile_number_consumer_id_key` (`mobile_number`,`consumer_id`),
  UNIQUE KEY `consumers_individual_partner_id_national_code_key` (`partner_id`,`national_code`),
  CONSTRAINT `consumers_individual_consumer_id_fkey` FOREIGN KEY (`consumer_id`) REFERENCES `consumers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `consumers_individual_partner_id_fkey` FOREIGN KEY (`partner_id`) REFERENCES `partners` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `consumers_individual`
--

LOCK TABLES `consumers_individual` WRITE;
/*!40000 ALTER TABLE `consumers_individual` DISABLE KEYS */;
/*!40000 ALTER TABLE `consumers_individual` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `consumers_legal`
--

DROP TABLE IF EXISTS `consumers_legal`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `consumers_legal` (
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `registration_code` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL,
  `partner_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `consumer_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`consumer_id`),
  UNIQUE KEY `consumers_legal_partner_id_registration_code_key` (`partner_id`,`registration_code`),
  CONSTRAINT `consumers_legal_consumer_id_fkey` FOREIGN KEY (`consumer_id`) REFERENCES `consumers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `consumers_legal_partner_id_fkey` FOREIGN KEY (`partner_id`) REFERENCES `partners` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `consumers_legal`
--

LOCK TABLES `consumers_legal` WRITE;
/*!40000 ALTER TABLE `consumers_legal` DISABLE KEYS */;
/*!40000 ALTER TABLE `consumers_legal` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `customer_individuals`
--

DROP TABLE IF EXISTS `customer_individuals`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `customer_individuals` (
  `first_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `last_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `national_id` char(10) COLLATE utf8mb4_unicode_ci NOT NULL,
  `postal_code` char(10) COLLATE utf8mb4_unicode_ci NOT NULL,
  `economic_code` char(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `customer_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `business_activity_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `mobile_number` char(15) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`customer_id`),
  UNIQUE KEY `customer_individuals_business_activity_id_national_id_key` (`business_activity_id`,`national_id`),
  KEY `customer_individuals_business_activity_id_idx` (`business_activity_id`),
  CONSTRAINT `customer_individuals_business_activity_id_fkey` FOREIGN KEY (`business_activity_id`) REFERENCES `business_activities` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
  CONSTRAINT `customer_individuals_customer_id_fkey` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `customer_individuals`
--

LOCK TABLES `customer_individuals` WRITE;
/*!40000 ALTER TABLE `customer_individuals` DISABLE KEYS */;
/*!40000 ALTER TABLE `customer_individuals` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `customer_legal`
--

DROP TABLE IF EXISTS `customer_legal`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `customer_legal` (
  `company_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `economic_code` char(10) COLLATE utf8mb4_unicode_ci NOT NULL,
  `registration_number` char(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `postal_code` char(10) COLLATE utf8mb4_unicode_ci NOT NULL,
  `customer_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `business_activity_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`customer_id`),
  UNIQUE KEY `customer_legal_business_activity_id_economic_code_key` (`business_activity_id`,`economic_code`),
  KEY `customer_legal_business_activity_id_idx` (`business_activity_id`),
  CONSTRAINT `customer_legal_business_activity_id_fkey` FOREIGN KEY (`business_activity_id`) REFERENCES `business_activities` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
  CONSTRAINT `customer_legal_customer_id_fkey` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `customer_legal`
--

LOCK TABLES `customer_legal` WRITE;
/*!40000 ALTER TABLE `customer_legal` DISABLE KEYS */;
/*!40000 ALTER TABLE `customer_legal` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `customers`
--

DROP TABLE IF EXISTS `customers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `customers` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `is_favorite` tinyint(1) DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `type` enum('INDIVIDUAL','LEGAL','UNKNOWN') COLLATE utf8mb4_unicode_ci 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 `customers`
--

LOCK TABLES `customers` WRITE;
/*!40000 ALTER TABLE `customers` DISABLE KEYS */;
INSERT INTO `customers` VALUES ('01KQ20CKZ8AKZR6R1QKEA5JCYE',0,'2026-04-25 09:44:01','2026-04-25 09:44:01',NULL,'INDIVIDUAL'),('01KQ2M7SFE75328NC05QF6B49E',0,'2026-04-25 15:30:55','2026-04-25 15:30:55',NULL,'LEGAL');
/*!40000 ALTER TABLE `customers` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `device_brands`
--

DROP TABLE IF EXISTS `device_brands`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `device_brands` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp 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 `device_brands`
--

LOCK TABLES `device_brands` WRITE;
/*!40000 ALTER TABLE `device_brands` DISABLE KEYS */;
/*!40000 ALTER TABLE `device_brands` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `devices`
--

DROP TABLE IF EXISTS `devices`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `devices` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `os_version` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL,
  `brand_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `devices_brand_id_fkey` (`brand_id`),
  CONSTRAINT `devices_brand_id_fkey` FOREIGN KEY (`brand_id`) REFERENCES `device_brands` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `devices`
--

LOCK TABLES `devices` WRITE;
/*!40000 ALTER TABLE `devices` DISABLE KEYS */;
/*!40000 ALTER TABLE `devices` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `good_categories`
--

DROP TABLE IF EXISTS `good_categories`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `good_categories` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci,
  `image_url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `complex_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_default_guild_good` tinyint(1) NOT NULL DEFAULT '0',
  `guild_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `good_categories_guild_id_fkey` (`guild_id`),
  KEY `good_categories_complex_id_fkey` (`complex_id`),
  CONSTRAINT `good_categories_complex_id_fkey` FOREIGN KEY (`complex_id`) REFERENCES `complexes` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `good_categories_guild_id_fkey` FOREIGN KEY (`guild_id`) REFERENCES `guilds` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `good_categories`
--

LOCK TABLES `good_categories` WRITE;
/*!40000 ALTER TABLE `good_categories` DISABLE KEYS */;
INSERT INTO `good_categories` VALUES ('01KPX63KRM17Y5X5NGY0FVMD05','سایر',NULL,NULL,NULL,1,'01KPX63KNQXAR1J032RVMAJ100','2026-04-23 12:47:45','2026-04-23 12:47:45',NULL),('01KPX63KRM4S453DZNRSHYA2V2','طلا',NULL,NULL,NULL,1,'01KPX63KNQXAR1J032RVMAJ100','2026-04-23 12:47:45','2026-04-23 12:47:45',NULL),('01KPX63KRMCRP04S1DGR97WVTQ','شمش',NULL,NULL,NULL,1,'01KPX63KNQXAR1J032RVMAJ100','2026-04-23 12:47:45','2026-04-23 12:47:45',NULL),('01KPX63KRMF31DNYWV2X10C1S7','شمش',NULL,NULL,NULL,1,'01KPX63KNQXAR1J032RVMAJ100','2026-04-23 12:47:45','2026-04-23 12:47:45',NULL),('01KPX63KRMGFVM2JSN7FHE8GGH','سکه',NULL,NULL,NULL,1,'01KPX63KNQXAR1J032RVMAJ100','2026-04-23 12:47:45','2026-04-23 12:47:45',NULL),('01KPX63KRMT4ZR69FSSTADAAV1','زیورآلات',NULL,NULL,NULL,1,'01KPX63KNQXAR1J032RVMAJ100','2026-04-23 12:47:45','2026-04-23 12:47:45',NULL);
/*!40000 ALTER TABLE `good_categories` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `goods`
--

DROP TABLE IF EXISTS `goods`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `goods` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `is_default_guild_good` tinyint(1) NOT NULL DEFAULT '0',
  `sku` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `unit_type` enum('COUNT','GRAM','KILOGRAM','MILLILITER','LITER','METER','HOUR') COLLATE utf8mb4_unicode_ci NOT NULL,
  `pricing_model` enum('STANDARD','GOLD') COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci,
  `local_sku` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `barcode` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `base_sale_price` decimal(15,0) DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `category_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `image_url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `business_activity_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `goods_local_sku_key` (`local_sku`),
  UNIQUE KEY `goods_barcode_key` (`barcode`),
  KEY `goods_category_id_idx` (`category_id`),
  KEY `goods_business_activity_id_fkey` (`business_activity_id`),
  CONSTRAINT `goods_business_activity_id_fkey` FOREIGN KEY (`business_activity_id`) REFERENCES `business_activities` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `goods_category_id_fkey` FOREIGN KEY (`category_id`) REFERENCES `good_categories` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `goods`
--

LOCK TABLES `goods` WRITE;
/*!40000 ALTER TABLE `goods` DISABLE KEYS */;
INSERT INTO `goods` VALUES ('01KPX63KVV5G03PRGWAY92M6C5','آویز گردنبند طلا',1,'333','GRAM','GOLD',NULL,NULL,NULL,0,'2026-04-23 12:47:46','2026-04-23 20:16:50',NULL,'01KPX63KRMT4ZR69FSSTADAAV1','https://s3.ir-thr-at1.arvanstorage.ir/psp-project/good/9880ff55-f351-4bb2-8f92-38d45c26eb11-necklaceÙpendant.webp',NULL),('01KPX63KVW1KMWFSGC7S6KD4PQ','انگشتر',1,'','GRAM','GOLD',NULL,NULL,NULL,0,'2026-04-23 12:47:46','2026-04-23 12:47:46',NULL,'01KPX63KRMT4ZR69FSSTADAAV1',NULL,NULL),('01KPX63KVW3P0X3870R278E7QS','النگو',1,'','GRAM','GOLD',NULL,NULL,NULL,0,'2026-04-23 12:47:46','2026-04-23 12:47:46',NULL,'01KPX63KRMT4ZR69FSSTADAAV1',NULL,NULL),('01KPX63KVW6A25X10BMZZHPVRZ','دست‌بند',1,'','GRAM','GOLD',NULL,NULL,NULL,0,'2026-04-23 12:47:46','2026-04-23 12:47:46',NULL,'01KPX63KRMT4ZR69FSSTADAAV1',NULL,NULL),('01KPX63KVWAMXBBJP1Y743N6W7','سرویس',1,'','GRAM','GOLD',NULL,NULL,NULL,0,'2026-04-23 12:47:46','2026-04-23 12:47:46',NULL,'01KPX63KRMT4ZR69FSSTADAAV1',NULL,NULL),('01KPX63KVWR5ZM2P536RC4E1G6','گوشواره',1,'','GRAM','GOLD',NULL,NULL,NULL,0,'2026-04-23 12:47:46','2026-04-23 12:47:46',NULL,'01KPX63KRMT4ZR69FSSTADAAV1',NULL,NULL),('01KPX63KVWWRQ3SJ78MAAZ5ETE','زنجیر',1,'','GRAM','GOLD',NULL,NULL,NULL,0,'2026-04-23 12:47:46','2026-04-23 12:47:46',NULL,'01KPX63KRMT4ZR69FSSTADAAV1',NULL,NULL),('01KPX63KYK0WHPTGGSH5TGXVBZ','طلای مستعمل',1,'','GRAM','GOLD',NULL,NULL,NULL,0,'2026-04-23 12:47:46','2026-04-23 12:47:46',NULL,'01KPX63KRM4S453DZNRSHYA2V2',NULL,NULL),('01KPX63KYK3EMYS7MCZVT1YJ0E','طلای شکسته',1,'','GRAM','GOLD',NULL,NULL,NULL,0,'2026-04-23 12:47:46','2026-04-23 12:47:46',NULL,'01KPX63KRM4S453DZNRSHYA2V2',NULL,NULL),('01KPX63KYKV1VK0F4W08QN4CGW','طلای آب شده',1,'','GRAM','GOLD',NULL,NULL,NULL,0,'2026-04-23 12:47:46','2026-04-23 12:47:46',NULL,'01KPX63KRM4S453DZNRSHYA2V2',NULL,NULL),('01KPX63M4C85AEE19ME3V8RHZ9','مسکوکات خارجی',1,'','COUNT','STANDARD',NULL,NULL,NULL,0,'2026-04-23 12:47:46','2026-04-23 12:47:46',NULL,'01KPX63KRMGFVM2JSN7FHE8GGH',NULL,NULL),('01KPX63M4D3E765VH9FD3SWSQT','تمام بهار آزادی (طرح جدید)',1,'','COUNT','STANDARD',NULL,NULL,NULL,0,'2026-04-23 12:47:46','2026-04-23 12:47:46',NULL,'01KPX63KRMGFVM2JSN7FHE8GGH',NULL,NULL),('01KPX63M4DSDK234E3XGQGJHS7','تمام بهار آزادی (طرح قدیم)',1,'','COUNT','STANDARD',NULL,NULL,NULL,0,'2026-04-23 12:47:46','2026-04-23 12:47:46',NULL,'01KPX63KRMGFVM2JSN7FHE8GGH',NULL,NULL),('01KPX63M4DXETEAHPR3401T469','مسکوکات داخلی (پارسیان)',1,'','COUNT','STANDARD',NULL,NULL,NULL,0,'2026-04-23 12:47:46','2026-04-23 12:47:46',NULL,'01KPX63KRMGFVM2JSN7FHE8GGH',NULL,NULL),('01KPX63M7EKNMMTF25QJNJM4QS','شمش استاندارد',1,'','GRAM','GOLD',NULL,NULL,NULL,0,'2026-04-23 12:47:46','2026-04-23 12:47:46',NULL,'01KPX63KRMCRP04S1DGR97WVTQ',NULL,NULL),('01KQ4AQHEKH9HWPAJHG7E1V9WN','دستبند',0,'۱۲۳۲','COUNT','GOLD',NULL,NULL,NULL,0,'2026-04-26 07:23:14','2026-04-26 07:23:26',NULL,'01KPX63KRM4S453DZNRSHYA2V2',NULL,'01KQ05Q8X0EQH4R79038WXXC19');
/*!40000 ALTER TABLE `goods` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `guilds`
--

DROP TABLE IF EXISTS `guilds`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `guilds` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `code` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp 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 `guilds`
--

LOCK TABLES `guilds` WRITE;
/*!40000 ALTER TABLE `guilds` DISABLE KEYS */;
INSERT INTO `guilds` VALUES ('01KPX63KNQ3PSK1RSBJNV00PMN','میوه و تره‌بار','Fruit','2026-04-23 12:47:45','2026-04-23 12:47:45'),('01KPX63KNQXAR1J032RVMAJ100','طلا','Gold','2026-04-23 12:47:45','2026-04-23 12:47:45');
/*!40000 ALTER TABLE `guilds` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `license_account_allocation`
--

DROP TABLE IF EXISTS `license_account_allocation`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `license_account_allocation` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL,
  `license_activation_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `account_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `credit_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `license_account_allocation_account_id_key` (`account_id`),
  UNIQUE KEY `license_account_allocation_credit_id_key` (`credit_id`),
  KEY `license_account_allocation_license_activation_id_fkey` (`license_activation_id`),
  CONSTRAINT `license_account_allocation_account_id_fkey` FOREIGN KEY (`account_id`) REFERENCES `consumer_accounts` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `license_account_allocation_credit_id_fkey` FOREIGN KEY (`credit_id`) REFERENCES `partner_account_quota_credit` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `license_account_allocation_license_activation_id_fkey` FOREIGN KEY (`license_activation_id`) REFERENCES `licenses_activated` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `license_account_allocation`
--

LOCK TABLES `license_account_allocation` WRITE;
/*!40000 ALTER TABLE `license_account_allocation` DISABLE KEYS */;
INSERT INTO `license_account_allocation` VALUES ('01KQ05Q90DZW821MTVDKS88N5V','2026-04-24 16:38:44','2026-04-24 18:29:47','01KQ05Q8YDXXB2J31DP2DHRS58','01KQ0C2K96Z64MRNFXSY1C1WKD',NULL),('01KQ05Q91RPSYHZZSZKNQ48TQ3','2026-04-24 16:38:45','2026-04-24 18:34:28','01KQ05Q8YDXXB2J31DP2DHRS58','01KQ0CB5PW4BKEXR947C9ZAXVP',NULL),('01KQ1WF429J6N7HEKZYE1VXE09','2026-04-25 08:35:29','2026-04-25 08:57:03','01KQ05Q8YDXXB2J31DP2DHRS58','01KQ1XPKGJ869MHG1DHJE2PV47','01KQ04EAYD2B8A4HN9XQ85Y1QD'),('01KQ2J44QGV0HEHWFQA77MRF4V','2026-04-25 14:53:58','2026-04-25 14:57:51','01KQ2J44DCE1XQWTS2Q6Z2A44W','01KQ2JB8RM5AY2KM5FSZE2SF45',NULL),('01KQ2J44T54PN7V035SHS3CYJT','2026-04-25 14:53:58','2026-04-25 14:53:58','01KQ2J44DCE1XQWTS2Q6Z2A44W',NULL,NULL),('01KQ2K5XHTGP8G41VHWYQPDQFY','2026-04-25 15:12:25','2026-04-25 15:12:25','01KQ2K5XAYMF0Z1PRPBWESQPTS',NULL,NULL),('01KQ2K5XM9A2CK5YXNBTD4DB2B','2026-04-25 15:12:25','2026-04-25 15:12:25','01KQ2K5XAYMF0Z1PRPBWESQPTS',NULL,NULL),('01KQ2KBJ2YZ513AE3MRJ60C90M','2026-04-25 15:15:30','2026-04-25 15:15:30','01KQ2J44DCE1XQWTS2Q6Z2A44W',NULL,'01KQ04EAZMAAYZ4HRW9DQ0MWV7'),('01KQ2WB994DRTZMAW6F5M9EV9X','2026-04-25 17:52:38','2026-04-25 17:55:01','01KQ2WB8ZDH4DY0E8M00G888G0','01KQ2WFMYZ3THXKBNMFB1EX0B9',NULL),('01KQ2WB9AWS2D0Z1WJVGH9TSAR','2026-04-25 17:52:38','2026-04-25 17:52:38','01KQ2WB8ZDH4DY0E8M00G888G0',NULL,NULL);
/*!40000 ALTER TABLE `license_account_allocation` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `license_charged_transactions`
--

DROP TABLE IF EXISTS `license_charged_transactions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `license_charged_transactions` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `activation_expires_at` datetime(3) NOT NULL,
  `tracking_code` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `purchased_count` int NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL,
  `partner_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `license_charged_transactions_tracking_code_key` (`tracking_code`),
  KEY `license_charged_transactions_partner_id_fkey` (`partner_id`),
  CONSTRAINT `license_charged_transactions_partner_id_fkey` FOREIGN KEY (`partner_id`) REFERENCES `partners` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `license_charged_transactions`
--

LOCK TABLES `license_charged_transactions` WRITE;
/*!40000 ALTER TABLE `license_charged_transactions` DISABLE KEYS */;
INSERT INTO `license_charged_transactions` VALUES ('01KQ033MCGMBBNAF9F2YEJ902H','2027-01-04 20:30:00.000','LIC-B01EVKMK',10,'2026-04-24 15:53:04','2026-04-24 15:53:04','01KPX63ME1JTT2YZNF087EA9TW'),('01KQ2GXFRWZFWQF2TTTJ4RKJHJ','2026-10-04 20:30:00.000','LIC-L00F3N48',2,'2026-04-25 14:32:51','2026-04-25 14:32:51','01KPX63ME1JTT2YZNF087EA9TW');
/*!40000 ALTER TABLE `license_charged_transactions` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `license_renew`
--

DROP TABLE IF EXISTS `license_renew`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `license_renew` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL,
  `charge_transaction_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `activation_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `expires_at` datetime(3) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `license_renew_charge_transaction_id_fkey` (`charge_transaction_id`),
  KEY `license_renew_activation_id_fkey` (`activation_id`),
  CONSTRAINT `license_renew_activation_id_fkey` FOREIGN KEY (`activation_id`) REFERENCES `licenses_activated` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `license_renew_charge_transaction_id_fkey` FOREIGN KEY (`charge_transaction_id`) REFERENCES `license_renew_charge_transaction` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `license_renew`
--

LOCK TABLES `license_renew` WRITE;
/*!40000 ALTER TABLE `license_renew` DISABLE KEYS */;
/*!40000 ALTER TABLE `license_renew` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `license_renew_charge_transaction`
--

DROP TABLE IF EXISTS `license_renew_charge_transaction`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `license_renew_charge_transaction` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `activation_expires_at` datetime(3) NOT NULL,
  `tracking_code` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `purchased_count` int NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL,
  `partner_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `license_renew_charge_transaction_tracking_code_key` (`tracking_code`),
  KEY `license_renew_charge_transaction_partner_id_fkey` (`partner_id`),
  CONSTRAINT `license_renew_charge_transaction_partner_id_fkey` FOREIGN KEY (`partner_id`) REFERENCES `partners` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `license_renew_charge_transaction`
--

LOCK TABLES `license_renew_charge_transaction` WRITE;
/*!40000 ALTER TABLE `license_renew_charge_transaction` DISABLE KEYS */;
/*!40000 ALTER TABLE `license_renew_charge_transaction` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `licenses`
--

DROP TABLE IF EXISTS `licenses`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `licenses` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL,
  `accounts_limit` int NOT NULL DEFAULT '2',
  `charge_transaction_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `licenses_charge_transaction_id_fkey` (`charge_transaction_id`),
  CONSTRAINT `licenses_charge_transaction_id_fkey` FOREIGN KEY (`charge_transaction_id`) REFERENCES `license_charged_transactions` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `licenses`
--

LOCK TABLES `licenses` WRITE;
/*!40000 ALTER TABLE `licenses` DISABLE KEYS */;
INSERT INTO `licenses` VALUES ('01KQ033MMNWE0KMCHY8FGBFSMA','2026-04-24 15:53:04','2026-04-24 15:53:04',2,'01KQ033MCGMBBNAF9F2YEJ902H'),('01KQ033MT3Y5GED3A2B0SX3AQP','2026-04-24 15:53:04','2026-04-24 15:53:04',2,'01KQ033MCGMBBNAF9F2YEJ902H'),('01KQ033MZMY26F4E9RS8SKH3G1','2026-04-24 15:53:04','2026-04-24 15:53:04',2,'01KQ033MCGMBBNAF9F2YEJ902H'),('01KQ033N66P32091R1FXC6VVZ6','2026-04-24 15:53:04','2026-04-24 15:53:04',2,'01KQ033MCGMBBNAF9F2YEJ902H'),('01KQ033N7HHDS7JD5ADZ27E6H1','2026-04-24 15:53:04','2026-04-24 15:53:04',2,'01KQ033MCGMBBNAF9F2YEJ902H'),('01KQ033NB49PCHDSCGQGWB333T','2026-04-24 15:53:05','2026-04-24 15:53:05',2,'01KQ033MCGMBBNAF9F2YEJ902H'),('01KQ033ND6VEA9P1P01NXXNH4R','2026-04-24 15:53:05','2026-04-24 15:53:05',2,'01KQ033MCGMBBNAF9F2YEJ902H'),('01KQ033NG49ARA17M385684MCQ','2026-04-24 15:53:05','2026-04-24 15:53:05',2,'01KQ033MCGMBBNAF9F2YEJ902H'),('01KQ033NHFM871YWAC123DGTT9','2026-04-24 15:53:05','2026-04-24 15:53:05',2,'01KQ033MCGMBBNAF9F2YEJ902H'),('01KQ033NP9ZQX9DN84WCN03TF8','2026-04-24 15:53:05','2026-04-24 15:53:05',2,'01KQ033MCGMBBNAF9F2YEJ902H'),('01KQ2GXFVPH7H5FYEEAKC5AC7V','2026-04-25 14:32:51','2026-04-25 14:32:51',2,'01KQ2GXFRWZFWQF2TTTJ4RKJHJ'),('01KQ2GXFX7Y7DC9R0K6BH3F2NN','2026-04-25 14:32:51','2026-04-25 14:32:51',2,'01KQ2GXFRWZFWQF2TTTJ4RKJHJ');
/*!40000 ALTER TABLE `licenses` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `licenses_activated`
--

DROP TABLE IF EXISTS `licenses_activated`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `licenses_activated` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `starts_at` datetime(3) NOT NULL,
  `expires_at` datetime(3) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL,
  `license_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `business_activity_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `licenses_activated_id_key` (`id`),
  UNIQUE KEY `licenses_activated_license_id_key` (`license_id`),
  UNIQUE KEY `licenses_activated_business_activity_id_key` (`business_activity_id`),
  CONSTRAINT `licenses_activated_business_activity_id_fkey` FOREIGN KEY (`business_activity_id`) REFERENCES `business_activities` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
  CONSTRAINT `licenses_activated_license_id_fkey` FOREIGN KEY (`license_id`) REFERENCES `licenses` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `licenses_activated`
--

LOCK TABLES `licenses_activated` WRITE;
/*!40000 ALTER TABLE `licenses_activated` DISABLE KEYS */;
INSERT INTO `licenses_activated` VALUES ('01KQ05Q8YDXXB2J31DP2DHRS58','2026-04-23 20:30:00.000','2027-04-23 20:30:00.000','2026-04-24 16:38:44','2026-04-24 16:38:44','01KQ033MMNWE0KMCHY8FGBFSMA','01KQ05Q8X0EQH4R79038WXXC19'),('01KQ2J44DCE1XQWTS2Q6Z2A44W','2026-04-24 20:30:00.000','2027-04-24 20:30:00.000','2026-04-25 14:53:57','2026-04-25 14:53:57','01KQ2GXFX7Y7DC9R0K6BH3F2NN','01KQ2J44B6SF32XDKY6SZ16TB4'),('01KQ2K5XAYMF0Z1PRPBWESQPTS','2026-04-24 20:30:00.000','2027-04-24 20:30:00.000','2026-04-25 15:12:24','2026-04-25 15:12:24','01KQ2GXFVPH7H5FYEEAKC5AC7V','01KQ2K5X6AHKR119VJQB7NC4NH'),('01KQ2WB8ZDH4DY0E8M00G888G0','2026-04-29 20:30:00.000','2027-04-29 20:30:00.000','2026-04-25 17:52:37','2026-04-25 17:52:37','01KQ033MT3Y5GED3A2B0SX3AQP','01KQ2WB8XGS33DQVSW3CPH9P13');
/*!40000 ALTER TABLE `licenses_activated` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `partner_account_quota_charge_transaction`
--

DROP TABLE IF EXISTS `partner_account_quota_charge_transaction`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `partner_account_quota_charge_transaction` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `purchased_count` int NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL,
  `partner_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `activation_expires_at` datetime(3) NOT NULL,
  `tracking_code` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `partner_account_quota_charge_transaction_tracking_code_key` (`tracking_code`),
  KEY `partner_account_quota_charge_transaction_partner_id_fkey` (`partner_id`),
  CONSTRAINT `partner_account_quota_charge_transaction_partner_id_fkey` FOREIGN KEY (`partner_id`) REFERENCES `partners` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `partner_account_quota_charge_transaction`
--

LOCK TABLES `partner_account_quota_charge_transaction` WRITE;
/*!40000 ALTER TABLE `partner_account_quota_charge_transaction` DISABLE KEYS */;
INSERT INTO `partner_account_quota_charge_transaction` VALUES ('01KQ04EAX09SX6BX1NMVXXKZ05',2,'2026-04-24 16:16:23','2026-04-24 16:16:23','01KPX63ME1JTT2YZNF087EA9TW','2026-12-20 20:30:00.000','AQC-A1XYDSK0'),('01KQ2GXVZ5HEC6YKJY1C5J1E03',5,'2026-04-25 14:33:04','2026-04-25 14:33:04','01KPX63ME1JTT2YZNF087EA9TW','2027-01-10 20:30:00.000','AQC-21L5RWEP');
/*!40000 ALTER TABLE `partner_account_quota_charge_transaction` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `partner_account_quota_credit`
--

DROP TABLE IF EXISTS `partner_account_quota_credit`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `partner_account_quota_credit` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL,
  `charge_transaction_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `partner_account_quota_credit_charge_transaction_id_fkey` (`charge_transaction_id`),
  CONSTRAINT `partner_account_quota_credit_charge_transaction_id_fkey` FOREIGN KEY (`charge_transaction_id`) REFERENCES `partner_account_quota_charge_transaction` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `partner_account_quota_credit`
--

LOCK TABLES `partner_account_quota_credit` WRITE;
/*!40000 ALTER TABLE `partner_account_quota_credit` DISABLE KEYS */;
INSERT INTO `partner_account_quota_credit` VALUES ('01KQ04EAYD2B8A4HN9XQ85Y1QD','2026-04-24 16:16:23','2026-04-24 16:16:23','01KQ04EAX09SX6BX1NMVXXKZ05'),('01KQ04EAZMAAYZ4HRW9DQ0MWV7','2026-04-24 16:16:23','2026-04-24 16:16:23','01KQ04EAX09SX6BX1NMVXXKZ05'),('01KQ2GXWAQDB2DXE033GB6NHRH','2026-04-25 14:33:04','2026-04-25 14:33:04','01KQ2GXVZ5HEC6YKJY1C5J1E03'),('01KQ2GXWG5S97TXDBZ2136CWWR','2026-04-25 14:33:04','2026-04-25 14:33:04','01KQ2GXVZ5HEC6YKJY1C5J1E03'),('01KQ2GXWHF4CVXDZVP6NDWA960','2026-04-25 14:33:04','2026-04-25 14:33:04','01KQ2GXVZ5HEC6YKJY1C5J1E03'),('01KQ2GXWJQXEBDDS2EJB4HGTT6','2026-04-25 14:33:04','2026-04-25 14:33:04','01KQ2GXVZ5HEC6YKJY1C5J1E03'),('01KQ2GXWN66R11E1BADMM3KQBD','2026-04-25 14:33:04','2026-04-25 14:33:04','01KQ2GXVZ5HEC6YKJY1C5J1E03');
/*!40000 ALTER TABLE `partner_account_quota_credit` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `partner_accounts`
--

DROP TABLE IF EXISTS `partner_accounts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `partner_accounts` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `role` enum('OWNER','MANAGER','OPERATOR') COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `partner_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `account_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `partner_accounts_account_id_key` (`account_id`),
  KEY `partner_accounts_partner_id_fkey` (`partner_id`),
  CONSTRAINT `partner_accounts_account_id_fkey` FOREIGN KEY (`account_id`) REFERENCES `accounts` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
  CONSTRAINT `partner_accounts_partner_id_fkey` FOREIGN KEY (`partner_id`) REFERENCES `partners` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `partner_accounts`
--

LOCK TABLES `partner_accounts` WRITE;
/*!40000 ALTER TABLE `partner_accounts` DISABLE KEYS */;
INSERT INTO `partner_accounts` VALUES ('01KPX63MF1491CQ2B1MSQFZAX9','OWNER','2026-04-23 12:47:46','2026-04-23 12:47:46','01KPX63ME1JTT2YZNF087EA9TW','01KPX63MEFBXD6E514VJJP5YJC'),('01KPZEE9D28BBHSF0KG491BJ9S','OWNER','2026-04-24 09:51:53','2026-04-24 09:51:53','01KPZEE9A759VE2D2J0MKN2CS2','01KPZEE9CNBHPD2BYQVEQ5F8KD');
/*!40000 ALTER TABLE `partner_accounts` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `partners`
--

DROP TABLE IF EXISTS `partners`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `partners` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `code` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` enum('ACTIVE','SUSPENDED') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'ACTIVE',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `logo_url` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `partners_code_key` (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `partners`
--

LOCK TABLES `partners` WRITE;
/*!40000 ALTER TABLE `partners` DISABLE KEYS */;
INSERT INTO `partners` VALUES ('01KPX63ME1JTT2YZNF087EA9TW','تیس','TIS','ACTIVE','2026-04-23 12:47:46','2026-04-23 12:47:46',NULL),('01KPZEE9A759VE2D2J0MKN2CS2','راهبر','rah','ACTIVE','2026-04-24 09:51:53','2026-04-24 09:51:53',NULL);
/*!40000 ALTER TABLE `partners` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `permission_business_activities`
--

DROP TABLE IF EXISTS `permission_business_activities`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `permission_business_activities` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `role` enum('MANAGER','OPERATOR') COLLATE utf8mb4_unicode_ci NOT NULL,
  `business_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `permission_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `permission_business_activities_permission_id_business_id_key` (`permission_id`,`business_id`),
  KEY `permission_business_activities_business_id_fkey` (`business_id`),
  CONSTRAINT `permission_business_activities_business_id_fkey` FOREIGN KEY (`business_id`) REFERENCES `business_activities` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `permission_business_activities_permission_id_fkey` FOREIGN KEY (`permission_id`) REFERENCES `permission_consumers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `permission_business_activities`
--

LOCK TABLES `permission_business_activities` WRITE;
/*!40000 ALTER TABLE `permission_business_activities` DISABLE KEYS */;
/*!40000 ALTER TABLE `permission_business_activities` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `permission_complexes`
--

DROP TABLE IF EXISTS `permission_complexes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `permission_complexes` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `role` enum('MANAGER','OPERATOR') COLLATE utf8mb4_unicode_ci NOT NULL,
  `complex_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `permission_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `permission_complexes_permission_id_complex_id_key` (`permission_id`,`complex_id`),
  KEY `permission_complexes_complex_id_fkey` (`complex_id`),
  CONSTRAINT `permission_complexes_complex_id_fkey` FOREIGN KEY (`complex_id`) REFERENCES `complexes` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `permission_complexes_permission_id_fkey` FOREIGN KEY (`permission_id`) REFERENCES `permission_consumers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `permission_complexes`
--

LOCK TABLES `permission_complexes` WRITE;
/*!40000 ALTER TABLE `permission_complexes` DISABLE KEYS */;
/*!40000 ALTER TABLE `permission_complexes` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `permission_consumers`
--

DROP TABLE IF EXISTS `permission_consumers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `permission_consumers` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `consumer_account_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `permission_consumers_consumer_account_id_key` (`consumer_account_id`),
  CONSTRAINT `permission_consumers_consumer_account_id_fkey` FOREIGN KEY (`consumer_account_id`) REFERENCES `consumer_accounts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `permission_consumers`
--

LOCK TABLES `permission_consumers` WRITE;
/*!40000 ALTER TABLE `permission_consumers` DISABLE KEYS */;
/*!40000 ALTER TABLE `permission_consumers` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `permission_poses`
--

DROP TABLE IF EXISTS `permission_poses`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `permission_poses` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `role` enum('MANAGER','OPERATOR') COLLATE utf8mb4_unicode_ci NOT NULL,
  `pos_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `permission_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `permission_poses_permission_id_pos_id_key` (`permission_id`,`pos_id`),
  KEY `permission_poses_pos_id_fkey` (`pos_id`),
  CONSTRAINT `permission_poses_permission_id_fkey` FOREIGN KEY (`permission_id`) REFERENCES `permission_consumers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `permission_poses_pos_id_fkey` FOREIGN KEY (`pos_id`) REFERENCES `poses` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `permission_poses`
--

LOCK TABLES `permission_poses` WRITE;
/*!40000 ALTER TABLE `permission_poses` DISABLE KEYS */;
/*!40000 ALTER TABLE `permission_poses` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `poses`
--

DROP TABLE IF EXISTS `poses`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `poses` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `model` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status` enum('ACTIVE','DISABLED') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'ACTIVE',
  `pos_type` enum('PSP','MOBILE','WEB','API') COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL,
  `complex_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `device_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `provider_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `serial_number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `account_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `poses_account_id_key` (`account_id`),
  UNIQUE KEY `poses_serial_number_key` (`serial_number`),
  KEY `poses_complex_id_fkey` (`complex_id`),
  KEY `poses_device_id_fkey` (`device_id`),
  KEY `poses_provider_id_fkey` (`provider_id`),
  CONSTRAINT `poses_account_id_fkey` FOREIGN KEY (`account_id`) REFERENCES `consumer_accounts` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
  CONSTRAINT `poses_complex_id_fkey` FOREIGN KEY (`complex_id`) REFERENCES `complexes` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
  CONSTRAINT `poses_device_id_fkey` FOREIGN KEY (`device_id`) REFERENCES `devices` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `poses_provider_id_fkey` FOREIGN KEY (`provider_id`) REFERENCES `providers` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `poses`
--

LOCK TABLES `poses` WRITE;
/*!40000 ALTER TABLE `poses` DISABLE KEYS */;
INSERT INTO `poses` VALUES ('01KQ0C2KAYAH96XW53ATNT6YZ6','پوز سپهر',NULL,'ACTIVE','WEB','2026-04-24 18:29:47','2026-04-24 18:29:47','01KQ0866BCDC6WPSNMTB0X6MKE',NULL,NULL,NULL,'01KQ0C2K96Z64MRNFXSY1C1WKD'),('01KQ0CB5RBX5JYZNNC0DJ8VKFN','دسکتاپ',NULL,'ACTIVE','WEB','2026-04-24 18:34:28','2026-04-24 18:34:28','01KQ0866BCDC6WPSNMTB0X6MKE',NULL,NULL,NULL,'01KQ0CB5PW4BKEXR947C9ZAXVP'),('01KQ1XPKJ3T1375FAFND7MYNKB','لاین ۱',NULL,'ACTIVE','MOBILE','2026-04-25 08:57:03','2026-04-25 08:57:03','01KQ1WFH94EYY2C46YC29QR895',NULL,NULL,NULL,'01KQ1XPKGJ869MHG1DHJE2PV47'),('01KQ2JB8STAJ8S1QBR6MMG7KX7','پوز سپهر',NULL,'ACTIVE','WEB','2026-04-25 14:57:51','2026-04-25 14:57:51','01KQ2J6YEHGZG8GHE0DFGCFY80',NULL,NULL,NULL,'01KQ2JB8RM5AY2KM5FSZE2SF45'),('01KQ2WFN01GKZK28HTDWMX1H8Z','پوز صادرات',NULL,'ACTIVE','MOBILE','2026-04-25 17:55:01','2026-04-25 17:55:01','01KQ2WCV8D0Q1SB1A471THF096',NULL,NULL,NULL,'01KQ2WFMYZ3THXKBNMFB1EX0B9');
/*!40000 ALTER TABLE `poses` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `provider_accounts`
--

DROP TABLE IF EXISTS `provider_accounts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `provider_accounts` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `role` enum('OWNER','MANAGER','OPERATOR') COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL,
  `provider_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `account_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `provider_accounts_account_id_key` (`account_id`),
  KEY `provider_accounts_provider_id_fkey` (`provider_id`),
  CONSTRAINT `provider_accounts_account_id_fkey` FOREIGN KEY (`account_id`) REFERENCES `accounts` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
  CONSTRAINT `provider_accounts_provider_id_fkey` FOREIGN KEY (`provider_id`) REFERENCES `providers` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `provider_accounts`
--

LOCK TABLES `provider_accounts` WRITE;
/*!40000 ALTER TABLE `provider_accounts` DISABLE KEYS */;
INSERT INTO `provider_accounts` VALUES ('01KPX63VKD61AB8ET3J1MAH522','OWNER','2026-04-23 12:47:53','2026-04-23 12:47:53','01KPX63VJJ29HRTHZ4YQZVVQG5','01KPX63VK0ACPB3JDQV5JBCY0F');
/*!40000 ALTER TABLE `provider_accounts` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `providers`
--

DROP TABLE IF EXISTS `providers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `providers` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `code` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` enum('ACTIVE','SUSPENDED') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'ACTIVE',
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `providers_code_key` (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `providers`
--

LOCK TABLES `providers` WRITE;
/*!40000 ALTER TABLE `providers` DISABLE KEYS */;
INSERT INTO `providers` VALUES ('01KPX63VJJ29HRTHZ4YQZVVQG5','Tosan','ACTIVE','توسن','2026-04-23 12:47:53','2026-04-23 12:47:53');
/*!40000 ALTER TABLE `providers` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `sales_invoice_items`
--

DROP TABLE IF EXISTS `sales_invoice_items`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sales_invoice_items` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `quantity` decimal(10,0) NOT NULL,
  `unit_type` enum('COUNT','GRAM','KILOGRAM','MILLILITER','LITER','METER','HOUR') COLLATE utf8mb4_unicode_ci NOT NULL,
  `unit_price` decimal(15,2) NOT NULL DEFAULT '0.00',
  `total_amount` decimal(15,2) NOT NULL DEFAULT '0.00',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `discount` decimal(15,2) NOT NULL DEFAULT '0.00',
  `notes` text COLLATE utf8mb4_unicode_ci,
  `invoice_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `good_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `service_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `payload` json DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `sales_invoice_items_invoice_id_good_id_idx` (`invoice_id`,`good_id`),
  KEY `sales_invoice_items_good_id_fkey` (`good_id`),
  KEY `sales_invoice_items_service_id_fkey` (`service_id`),
  CONSTRAINT `sales_invoice_items_good_id_fkey` FOREIGN KEY (`good_id`) REFERENCES `goods` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `sales_invoice_items_invoice_id_fkey` FOREIGN KEY (`invoice_id`) REFERENCES `sales_invoices` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
  CONSTRAINT `sales_invoice_items_service_id_fkey` FOREIGN KEY (`service_id`) REFERENCES `services` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `sales_invoice_items`
--

LOCK TABLES `sales_invoice_items` WRITE;
/*!40000 ALTER TABLE `sales_invoice_items` DISABLE KEYS */;
/*!40000 ALTER TABLE `sales_invoice_items` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `sales_invoice_payments`
--

DROP TABLE IF EXISTS `sales_invoice_payments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sales_invoice_payments` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `invoice_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `amount` decimal(15,2) NOT NULL,
  `payment_method` enum('TERMINAL','CASH','SET_OFF','CARD','BANK','CHECK','OTHER') COLLATE utf8mb4_unicode_ci NOT NULL,
  `paid_at` datetime(3) NOT NULL,
  `created_at` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
  PRIMARY KEY (`id`),
  KEY `sales_invoice_payments_invoice_id_idx` (`invoice_id`),
  CONSTRAINT `sales_invoice_payments_invoice_id_fkey` FOREIGN KEY (`invoice_id`) REFERENCES `sales_invoices` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `sales_invoice_payments`
--

LOCK TABLES `sales_invoice_payments` WRITE;
/*!40000 ALTER TABLE `sales_invoice_payments` DISABLE KEYS */;
/*!40000 ALTER TABLE `sales_invoice_payments` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `sales_invoices`
--

DROP TABLE IF EXISTS `sales_invoices`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sales_invoices` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `code` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `total_amount` decimal(15,2) NOT NULL,
  `notes` text COLLATE utf8mb4_unicode_ci,
  `unknown_customer` json DEFAULT NULL,
  `invoice_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL,
  `customer_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `account_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `pos_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `sales_invoices_code_key` (`code`),
  KEY `sales_invoices_customer_id_fkey` (`customer_id`),
  KEY `sales_invoices_pos_id_fkey` (`pos_id`),
  KEY `sales_invoices_account_id_fkey` (`account_id`),
  CONSTRAINT `sales_invoices_account_id_fkey` FOREIGN KEY (`account_id`) REFERENCES `consumer_accounts` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
  CONSTRAINT `sales_invoices_customer_id_fkey` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `sales_invoices_pos_id_fkey` FOREIGN KEY (`pos_id`) REFERENCES `poses` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `sales_invoices`
--

LOCK TABLES `sales_invoices` WRITE;
/*!40000 ALTER TABLE `sales_invoices` DISABLE KEYS */;
/*!40000 ALTER TABLE `sales_invoices` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `service_categories`
--

DROP TABLE IF EXISTS `service_categories`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `service_categories` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci,
  `image_url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `account_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `complex_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL,
  `deleted_at` timestamp NULL DEFAULT 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 `service_categories`
--

LOCK TABLES `service_categories` WRITE;
/*!40000 ALTER TABLE `service_categories` DISABLE KEYS */;
/*!40000 ALTER TABLE `service_categories` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `services`
--

DROP TABLE IF EXISTS `services`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `services` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci,
  `sku` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `local_sku` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `barcode` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `category_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `base_sale_price` decimal(15,0) NOT NULL DEFAULT '0',
  `account_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `complex_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `services_sku_key` (`sku`),
  UNIQUE KEY `services_local_sku_key` (`local_sku`),
  UNIQUE KEY `services_barcode_key` (`barcode`),
  KEY `services_category_id_idx` (`category_id`),
  CONSTRAINT `services_category_id_fkey` FOREIGN KEY (`category_id`) REFERENCES `service_categories` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `services`
--

LOCK TABLES `services` WRITE;
/*!40000 ALTER TABLE `services` DISABLE KEYS */;
/*!40000 ALTER TABLE `services` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `trigger_logs`
--

DROP TABLE IF EXISTS `trigger_logs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `trigger_logs` (
  `id` int NOT NULL AUTO_INCREMENT,
  `message` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `createdAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `name` text COLLATE utf8mb4_unicode_ci 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 `trigger_logs`
--

LOCK TABLES `trigger_logs` WRITE;
/*!40000 ALTER TABLE `trigger_logs` DISABLE KEYS */;
/*!40000 ALTER TABLE `trigger_logs` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Dumping routines for database 'psp'
--
--
-- WARNING: can't read the INFORMATION_SCHEMA.libraries table. It's most probably an old server 8.0.45.
--
/*!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-04-27  9:20:30
