-- MySQL dump 10.13  Distrib 8.0.33, for Win64 (x86_64)
--
-- Host: 127.0.0.1    Database: emedsol_test
-- ------------------------------------------------------
-- Server version	8.0.35

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

--
-- Table structure for table `department`
--

DROP TABLE IF EXISTS `department`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `department` (
  `department_id` int NOT NULL AUTO_INCREMENT,
  `supervisor_id` int DEFAULT NULL,
  `department_name` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_by` int NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` int DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`department_id`),
  UNIQUE KEY `department_name` (`department_name`),
  KEY `department_supervisor_id_foreign` (`supervisor_id`),
  KEY `department_created_by_foreign` (`created_by`),
  KEY `department_updated_by_foreign` (`updated_by`),
  CONSTRAINT `department_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `user` (`user_id`) ON UPDATE CASCADE,
  CONSTRAINT `department_supervisor_id_foreign` FOREIGN KEY (`supervisor_id`) REFERENCES `employee` (`employee_id`) ON UPDATE CASCADE,
  CONSTRAINT `department_updated_by_foreign` FOREIGN KEY (`updated_by`) REFERENCES `user` (`user_id`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `department`
--

/*!40000 ALTER TABLE `department` DISABLE KEYS */;
use emedsol;
INSERT INTO `department` VALUES (1,NULL,'Administration',1,'2024-04-19 12:48:49',NULL,NULL,NULL),(2,NULL,'Finance',1,'2024-04-19 12:48:49',NULL,NULL,NULL),(3,NULL,'Imagerie',1,'2024-04-19 12:48:49',NULL,NULL,NULL),(4,NULL,'Infirmerie',1,'2024-04-19 12:48:49',NULL,NULL,NULL),(5,NULL,'Inventaire',1,'2024-04-19 12:48:49',NULL,NULL,NULL),(6,NULL,'IT',1,'2024-04-19 12:48:49',NULL,NULL,NULL),(7,NULL,'Laboratoire',1,'2024-04-19 12:48:49',NULL,NULL,NULL),(8,NULL,'Maintenance',1,'2024-04-19 12:48:49',NULL,NULL,NULL),(9,NULL,'Docteur',1,'2024-04-19 12:48:49',NULL,NULL,NULL),(10,NULL,'Pharmacie',1,'2024-04-19 12:48:49',NULL,NULL,NULL),(11,NULL,'Secrétariat',1,'2024-04-19 12:48:49',NULL,NULL,NULL);
/*!40000 ALTER TABLE `department` ENABLE KEYS */;
/*!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 2024-07-22  4:50:46
