--
-- Host: 127.0.0.1    Database: moonui2_dev_be
-- ------------------------------------------------------


--
-- Table structure for table `currencies`
--

CREATE TABLE `currencies` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `company_id` bigint(20) unsigned NOT NULL,
  `code` varchar(10) NOT NULL COMMENT 'ISO 4217',
  `name` varchar(255) NOT NULL,
  `name_ar` varchar(255) NOT NULL,
  `symbol` varchar(10) NOT NULL,
  `decimals` tinyint(3) unsigned NOT NULL DEFAULT 2,
  `is_base` tinyint(1) NOT NULL DEFAULT 0,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `currencies_company_id_code_unique` (`company_id`,`code`),
  CONSTRAINT `currencies_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `currencies`
--

INSERT INTO `currencies` VALUES
(1,4,'KWD','Kuwaiti Dinar','دينار كويتي','د.ك',2,0,1,'2026-02-18 20:51:55','2026-02-18 20:51:55',NULL),
(2,4,'USD','US Dollar','دولار أمريكي','$',2,0,1,'2026-02-18 23:04:49','2026-02-18 23:04:51','2026-02-18 23:04:51'),
(6,4,'EUR','Euro','يورو','E',2,0,1,'2026-02-18 23:53:03','2026-06-20 00:27:05',NULL),
(7,4,'EG','جنيه','جنيه','EG',2,0,0,'2026-02-19 18:14:18','2026-04-27 08:39:45',NULL),
(8,4,'EGP','جنيه مصري','جنيه مصري','ج.م',2,0,0,'2026-02-27 23:23:06','2026-04-27 08:39:36',NULL),
(9,4,'SAR','ريال سعودى','ريال سعودى','SAR',2,1,1,'2026-04-27 08:39:21','2026-06-20 00:27:05',NULL);


