diff --git a/DB/announcement.sql b/DB/announcement.sql new file mode 100644 index 00000000..214f6220 --- /dev/null +++ b/DB/announcement.sql @@ -0,0 +1,32 @@ + +-- Table structure for table `announcement` +-- + +DROP TABLE IF EXISTS `announcement`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `announcement` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` varchar(255) NOT NULL, + `description` text NOT NULL, + `created_at` datetime NOT NULL, + `user_id` int(11) NOT NULL DEFAULT 0 COMMENT '0 means all', + `is_seen` enum('0','1') NOT NULL DEFAULT '0', + `seen_by` text NOT NULL COMMENT 'if user_id = 0 then comma seperated user_ids', + `last_seen_at` datetime NOT NULL, + `color_class` varchar(50) NOT NULL DEFAULT 'primary', + `icon` varchar(50) NOT NULL DEFAULT 'fas fa-bell', + `status` enum('published','draft') NOT NULL DEFAULT 'draft', + PRIMARY KEY (`id`), + KEY `for_user_id` (`user_id`,`status`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `announcement` +-- + +LOCK TABLES `announcement` WRITE; +/*!40000 ALTER TABLE `announcement` DISABLE KEYS */; +/*!40000 ALTER TABLE `announcement` ENABLE KEYS */; +UNLOCK TABLES;