-- MySQL dump 10.13  Distrib 8.0.36, for macos14 (x86_64)
--
-- Host: 127.0.0.1    Database: regiondo_papershift
-- ------------------------------------------------------
-- Server version	9.0.1

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

DROP TABLE IF EXISTS `Asseigment`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `Asseigment` (
  `id` int NOT NULL AUTO_INCREMENT,
  `username` varchar(45) NOT NULL,
  `user_id` int NOT NULL,
  `main_shift_name` varchar(45) NOT NULL,
  `main_shift_id` int NOT NULL,
  `date` datetime NOT NULL,
  `main_shift_start_at` datetime NOT NULL,
  `main_shift_end_at` datetime NOT NULL,
  `gap_workingarea_id` int NOT NULL,
  `gap_workingarea_name` varchar(45) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `Asseigment`
--

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

--
-- Table structure for table `Events`
--

DROP TABLE IF EXISTS `Events`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `Events` (
  `id` int NOT NULL AUTO_INCREMENT,
  `variation_id` int NOT NULL,
  `product_id` varchar(255) NOT NULL,
  `shift_id_papershift` int NOT NULL,
  `workingarea_id` int NOT NULL,
  `shift_id_regiondo` varchar(100) NOT NULL,
  `note_hash_regiondo` varchar(100) DEFAULT NULL,
  `date_start` datetime NOT NULL,
  `date_end` datetime NOT NULL,
  `matching_standort_id` int NOT NULL,
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `matching_standort_id` (`matching_standort_id`),
  CONSTRAINT `events_ibfk_1` FOREIGN KEY (`matching_standort_id`) REFERENCES `MatchingStandorte` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `Events`
--

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

--
-- Table structure for table `Log`
--

DROP TABLE IF EXISTS `Log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `Log` (
  `id` int NOT NULL AUTO_INCREMENT,
  `matching_standort_id` int NOT NULL,
  `operation` varchar(50) NOT NULL,
  `tabelle` varchar(50) NOT NULL,
  `beschreibung` text,
  `timestamp` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `matching_standort_id` (`matching_standort_id`),
  CONSTRAINT `logtabelle_ibfk_1` FOREIGN KEY (`matching_standort_id`) REFERENCES `MatchingStandorte` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `Log`
--

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

--
-- Table structure for table `Main_shifts`
--

DROP TABLE IF EXISTS `Main_shifts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `Main_shifts` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `main_shift_id` int unsigned NOT NULL,
  `main_shift_name` varchar(45) NOT NULL,
  `working_area_id` int NOT NULL,
  `date` datetime NOT NULL,
  `starts_at` datetime NOT NULL,
  `ends_at` datetime NOT NULL,
  `note_hash` varchar(255) NOT NULL,
  `matching_standort_id` int NOT NULL,
  PRIMARY KEY (`id`),
  KEY `if_matching_standort_id_idx` (`matching_standort_id`),
  CONSTRAINT `if_matching_standort_id` FOREIGN KEY (`matching_standort_id`) REFERENCES `MatchingStandorte` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `Main_shifts`
--

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

--
-- Table structure for table `MatchingStandorte`
--

DROP TABLE IF EXISTS `MatchingStandorte`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `MatchingStandorte` (
  `id` int NOT NULL AUTO_INCREMENT,
  `id_standort_papershift` int NOT NULL,
  `PUBLIC_KEY_regiondo` varchar(100) NOT NULL,
  `ausfuehrung_zeit` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `id_UNIQUE` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `MatchingStandorte`
--

LOCK TABLES `MatchingStandorte` WRITE;
/*!40000 ALTER TABLE `MatchingStandorte` DISABLE KEYS */;
INSERT INTO `MatchingStandorte` VALUES (1,211500,'AU432ac2230797','2025-01-28 09:21:54'),(2,211500,'AN8185f29b73703','2025-01-29 09:44:49'),(3,213472,'AN8185f29b73703','2025-04-14 18:45:15'),(4,179719,'AU432ac2230797','2025-06-02 09:53:39'),(5,214432,'AN8185f29b73703','2025-06-11 13:40:11'),(6,214432,'AU432ac2230797','2025-06-11 15:17:23');
/*!40000 ALTER TABLE `MatchingStandorte` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `Time_block`
--

DROP TABLE IF EXISTS `Time_block`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `Time_block` (
  `id` int NOT NULL AUTO_INCREMENT,
  `user_id` int NOT NULL,
  `username` varchar(45) NOT NULL,
  `datum` date NOT NULL,
  `start_at` datetime NOT NULL,
  `end_at` datetime NOT NULL,
  `shift_id` int DEFAULT NULL,
  `main_shift_id` int DEFAULT NULL,
  `main_shift_name` varchar(45) DEFAULT NULL,
  `main_shift_start_at` datetime NOT NULL,
  `main_shift_end_at` datetime NOT NULL,
  `virtual_workingarea_id` int DEFAULT NULL,
  `virtual_workingarea_name` varchar(45) DEFAULT NULL,
  `pause` int NOT NULL DEFAULT '0',
  `status` varchar(20) NOT NULL,
  `nachPause_id` int DEFAULT NULL,
  `vorPause_id` int DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `Time_block`
--

LOCK TABLES `Time_block` WRITE;
/*!40000 ALTER TABLE `Time_block` DISABLE KEYS */;
/*!40000 ALTER TABLE `Time_block` 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 2025-06-12 10:52:10
