275 lines
12 KiB
SQL
275 lines
12 KiB
SQL
/*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_38394
|
|
-- ------------------------------------------------------
|
|
-- 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 `audit_logs`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `audit_logs`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `audit_logs` (
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
`user_id` int(11) DEFAULT NULL,
|
|
`action` varchar(255) NOT NULL,
|
|
`details` text DEFAULT NULL,
|
|
`created_at` timestamp NULL DEFAULT current_timestamp(),
|
|
PRIMARY KEY (`id`),
|
|
KEY `user_id` (`user_id`),
|
|
CONSTRAINT `audit_logs_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL
|
|
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Dumping data for table `audit_logs`
|
|
--
|
|
|
|
LOCK TABLES `audit_logs` WRITE;
|
|
/*!40000 ALTER TABLE `audit_logs` DISABLE KEYS */;
|
|
INSERT INTO `audit_logs` VALUES
|
|
(1,1,'login','User admin@charityhub.com logged in successfully.','2026-02-13 10:13:11');
|
|
/*!40000 ALTER TABLE `audit_logs` ENABLE KEYS */;
|
|
UNLOCK TABLES;
|
|
|
|
--
|
|
-- Table structure for table `cases`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `cases`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `cases` (
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
`category_id` int(11) NOT NULL,
|
|
`title_en` varchar(255) NOT NULL,
|
|
`title_ar` varchar(255) NOT NULL,
|
|
`desc_en` text DEFAULT NULL,
|
|
`desc_ar` text DEFAULT NULL,
|
|
`goal` decimal(10,2) NOT NULL,
|
|
`raised` decimal(10,2) DEFAULT 0.00,
|
|
`image_url` varchar(255) DEFAULT NULL,
|
|
`importance` enum('normal','urgent','top_priority') DEFAULT 'normal',
|
|
`status` enum('active','paused','disabled') DEFAULT 'active',
|
|
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 `cases`
|
|
--
|
|
|
|
LOCK TABLES `cases` WRITE;
|
|
/*!40000 ALTER TABLE `cases` DISABLE KEYS */;
|
|
INSERT INTO `cases` VALUES
|
|
(1,1,'Clean Water Project','مشروع المياه النظيفة','Providing clean water to remote villages.','توفير المياه النظيفة للقرى النائية.',50000.00,15000.00,'https://images.pexels.com/photos/1072824/pexels-photo-1072824.jpeg?auto=compress&cs=tinysrgb&w=600','normal','active'),
|
|
(2,1,'Emergency Medical Supplies','إمدادات طبية طارئة','Urgent medical aid for disaster-stricken areas.','مساعدات طبية عاجلة للمناطق المنكوبة.',25000.00,18500.00,'https://images.pexels.com/photos/115594/pexels-photo-115594.jpeg?auto=compress&cs=tinysrgb&w=600','urgent','active'),
|
|
(3,2,'Scholarships for Orphans','منح دراسية للأيتام','Supporting orphans with higher education costs.','دعم الأيتام في تكاليف التعليم العالي.\r\nدعم الأيتام في تكاليف التعليم العالي.\r\nدعم الأيتام في تكاليف التعليم العالي.\r\nدعم الأيتام في تكاليف التعليم العالي.\r\nدعم الأيتام في تكاليف التعليم العالي.\r\nدعم الأيتام في تكاليف التعليم العالي.\r\nدعم الأيتام في تكاليف التعليم العالي.',10000.00,2000.00,'assets/images/cases/case_698edda6587b1.jpg','top_priority','active');
|
|
/*!40000 ALTER TABLE `cases` ENABLE KEYS */;
|
|
UNLOCK TABLES;
|
|
|
|
--
|
|
-- Table structure for table `categories`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `categories`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `categories` (
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
`name_en` varchar(255) NOT NULL,
|
|
`name_ar` varchar(255) NOT NULL,
|
|
`logo_url` varchar(255) DEFAULT 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 `categories`
|
|
--
|
|
|
|
LOCK TABLES `categories` WRITE;
|
|
/*!40000 ALTER TABLE `categories` DISABLE KEYS */;
|
|
INSERT INTO `categories` VALUES
|
|
(1,'Global Health Initiative','المبادرة العالمية للصحة','https://images.pexels.com/photos/6646917/pexels-photo-6646917.jpeg?auto=compress&cs=tinysrgb&w=150'),
|
|
(2,'Education for All','التعليم للجميع','https://images.pexels.com/photos/301920/pexels-photo-301920.jpeg?auto=compress&cs=tinysrgb&w=150');
|
|
/*!40000 ALTER TABLE `categories` ENABLE KEYS */;
|
|
UNLOCK TABLES;
|
|
|
|
--
|
|
-- Table structure for table `donations`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `donations`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `donations` (
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
`case_id` int(11) NOT NULL,
|
|
`amount` decimal(10,2) NOT NULL,
|
|
`status` enum('pending','completed','failed') DEFAULT 'pending',
|
|
`transaction_id` varchar(255) DEFAULT NULL,
|
|
`donor_name` varchar(255) DEFAULT NULL,
|
|
`donor_email` varchar(255) DEFAULT NULL,
|
|
`donor_phone` varchar(50) DEFAULT NULL,
|
|
`created_at` timestamp NULL DEFAULT current_timestamp(),
|
|
`is_gift` tinyint(1) DEFAULT 0,
|
|
`gift_recipient_name` varchar(255) DEFAULT NULL,
|
|
`gift_recipient_phone` varchar(50) DEFAULT NULL,
|
|
`gift_message` text DEFAULT NULL,
|
|
PRIMARY KEY (`id`),
|
|
KEY `case_id` (`case_id`),
|
|
CONSTRAINT `donations_ibfk_1` FOREIGN KEY (`case_id`) REFERENCES `cases` (`id`) ON DELETE CASCADE
|
|
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Dumping data for table `donations`
|
|
--
|
|
|
|
LOCK TABLES `donations` WRITE;
|
|
/*!40000 ALTER TABLE `donations` DISABLE KEYS */;
|
|
INSERT INTO `donations` VALUES
|
|
(1,3,250.00,'pending',NULL,'moosa','aalabry@gmail.com','96899359472','2026-02-13 07:53:08',0,NULL,NULL,NULL);
|
|
/*!40000 ALTER TABLE `donations` ENABLE KEYS */;
|
|
UNLOCK TABLES;
|
|
|
|
--
|
|
-- Table structure for table `org_profile`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `org_profile`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `org_profile` (
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
`name_en` varchar(255) NOT NULL,
|
|
`name_ar` varchar(255) NOT NULL,
|
|
`logo_url` varchar(255) DEFAULT NULL,
|
|
`favicon_url` varchar(255) DEFAULT NULL,
|
|
`description_en` text DEFAULT NULL,
|
|
`description_ar` text DEFAULT NULL,
|
|
`email` varchar(255) DEFAULT NULL,
|
|
`phone` varchar(255) DEFAULT NULL,
|
|
`address` text 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 `org_profile`
|
|
--
|
|
|
|
LOCK TABLES `org_profile` WRITE;
|
|
/*!40000 ALTER TABLE `org_profile` DISABLE KEYS */;
|
|
INSERT INTO `org_profile` VALUES
|
|
(1,'Al-Hamra Charity Team','فريق الحمراء التطوعي','assets/images/logo_1770967720.jpg','assets/images/favicon_1770977716.jpg','','','','','');
|
|
/*!40000 ALTER TABLE `org_profile` ENABLE KEYS */;
|
|
UNLOCK TABLES;
|
|
|
|
--
|
|
-- Table structure for table `settings`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `settings`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `settings` (
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
`setting_key` varchar(100) NOT NULL,
|
|
`setting_value` text DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
|
|
PRIMARY KEY (`id`),
|
|
UNIQUE KEY `setting_key` (`setting_key`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Dumping data for table `settings`
|
|
--
|
|
|
|
LOCK TABLES `settings` WRITE;
|
|
/*!40000 ALTER TABLE `settings` DISABLE KEYS */;
|
|
INSERT INTO `settings` VALUES
|
|
(1,'thawani_secret_key','','2026-02-13 07:31:27'),
|
|
(2,'thawani_publishable_key','','2026-02-13 07:31:27'),
|
|
(3,'thawani_env','sandbox','2026-02-13 07:31:27'),
|
|
(4,'wablas_api_token','','2026-02-13 07:31:27'),
|
|
(5,'wablas_server_url','https://console.wablas.com','2026-02-13 07:31:27'),
|
|
(6,'wablas_security_key','','2026-02-13 07:38:18'),
|
|
(7,'mail_transport','smtp','2026-02-13 09:47:55'),
|
|
(8,'mail_host','','2026-02-13 09:47:55'),
|
|
(9,'mail_port','587','2026-02-13 09:47:55'),
|
|
(10,'mail_encryption','tls','2026-02-13 09:47:55'),
|
|
(11,'mail_username','','2026-02-13 09:47:55'),
|
|
(12,'mail_password','','2026-02-13 09:47:55'),
|
|
(13,'mail_from_address','','2026-02-13 09:47:55'),
|
|
(14,'mail_from_name','','2026-02-13 09:58:10'),
|
|
(15,'pop3_host','','2026-02-13 09:47:55'),
|
|
(16,'pop3_port','995','2026-02-13 09:47:55'),
|
|
(17,'pop3_username','','2026-02-13 09:47:55'),
|
|
(18,'pop3_password','','2026-02-13 09:47:55'),
|
|
(19,'report_recipient_email','','2026-02-13 09:48:27');
|
|
/*!40000 ALTER TABLE `settings` ENABLE KEYS */;
|
|
UNLOCK TABLES;
|
|
|
|
--
|
|
-- Table structure for table `users`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `users`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `users` (
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
`email` varchar(255) NOT NULL,
|
|
`password` varchar(255) NOT NULL,
|
|
`role` enum('super_admin','org_admin') NOT NULL,
|
|
`org_id` int(11) DEFAULT NULL,
|
|
`created_at` timestamp NULL DEFAULT current_timestamp(),
|
|
PRIMARY KEY (`id`),
|
|
UNIQUE KEY `email` (`email`),
|
|
KEY `org_id` (`org_id`),
|
|
CONSTRAINT `users_ibfk_1` FOREIGN KEY (`org_id`) REFERENCES `categories` (`id`) ON DELETE SET NULL
|
|
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Dumping data for table `users`
|
|
--
|
|
|
|
LOCK TABLES `users` WRITE;
|
|
/*!40000 ALTER TABLE `users` DISABLE KEYS */;
|
|
INSERT INTO `users` VALUES
|
|
(1,'admin@charityhub.com','$2y$10$IzrWwdMjLg1EMZFFfXD1W.sHiqzJPmgvVhr.0rNkXyCL6EBwjxmku','super_admin',NULL,'2026-02-13 06:33:47'),
|
|
(2,'org1@test.com','$2y$10$IzrWwdMjLg1EMZFFfXD1W.sHiqzJPmgvVhr.0rNkXyCL6EBwjxmku','org_admin',1,'2026-02-13 06:33:47'),
|
|
(3,'org2@test.com','$2y$10$IzrWwdMjLg1EMZFFfXD1W.sHiqzJPmgvVhr.0rNkXyCL6EBwjxmku','org_admin',2,'2026-02-13 06:33:47'),
|
|
(4,'admin_new@charityhub.com','$2y$10$/kPG1sHbgdewbPWI8Q8HTuZTxh0C9WCSiElA2QJqhjfWWjOI7..fO','super_admin',NULL,'2026-02-13 10:38:19');
|
|
/*!40000 ALTER TABLE `users` 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-13 10:38:22
|