-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 25, 2026 at 07:09 AM
-- Wersja serwera: 10.4.32-MariaDB
-- Wersja PHP: 8.2.12

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


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

--
-- Database: `atelier_20260227`
--

-- --------------------------------------------------------

--
-- Struktura tabeli dla tabeli `notification_read_log`
--

CREATE TABLE `notification_read_log` (
  `id_notification` int(11) NOT NULL,
  `id_employee` bigint(20) NOT NULL,
  `id_shop` int(11) NOT NULL,
  `last_read_at` datetime DEFAULT current_timestamp(),
  `last_seen_date` date DEFAULT NULL,
  `read_count` int(11) DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `notification_read_log`
--

INSERT INTO `notification_read_log` (`id_notification`, `id_employee`, `id_shop`, `last_read_at`, `last_seen_date`, `read_count`) VALUES
(3, 17, 2, '2025-10-16 14:04:00', NULL, 1),
(3, 43, 5, '2025-10-16 13:38:47', NULL, 1),
(3, 76, 3, '2025-10-17 09:58:48', NULL, 1),
(4, 16, 2, '2025-10-20 18:56:01', NULL, 1),
(4, 43, 5, '2025-10-21 13:25:19', NULL, 1);

--
-- Indeksy dla zrzutów tabel
--

--
-- Indeksy dla tabeli `notification_read_log`
--
ALTER TABLE `notification_read_log`
  ADD PRIMARY KEY (`id_notification`,`id_employee`) USING BTREE;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `notification_read_log`
--
ALTER TABLE `notification_read_log`
  ADD CONSTRAINT `notification_read_log_ibfk_1` FOREIGN KEY (`id_notification`) REFERENCES `notification` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
COMMIT;

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