-- Adminer 4.8.1 MySQL 10.11.6-MariaDB-0+deb12u1 dump

SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';

DROP TABLE IF EXISTS `content`;
CREATE TABLE `content` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `title` varchar(250) DEFAULT NULL,
  `txt` longtext DEFAULT NULL,
  `json` longtext DEFAULT NULL,
  `content_category` int(10) DEFAULT NULL,
  `status` int(11) NOT NULL DEFAULT 1,
  `user` int(10) NOT NULL,
  `t` varchar(40) NOT NULL,
  `content_type` int(10) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `content_category` (`content_category`),
  KEY `user` (`user`),
  KEY `content_type` (`content_type`),
  CONSTRAINT `content_ibfk_2` FOREIGN KEY (`user`) REFERENCES `users` (`id`),
  CONSTRAINT `content_ibfk_3` FOREIGN KEY (`content_type`) REFERENCES `content_type` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf32 COLLATE=utf32_general_ci;

INSERT INTO `content` (`id`, `title`, `txt`, `json`, `content_category`, `status`, `user`, `t`, `content_type`) VALUES
(1,	NULL,	'test',	'{\"doc\":\"53482_План действий.docx\",\"srok\":\"53482_План действий.docx\",\"target_user\":\"53482_План действий.docx\",\"prioritet\":\"53482_План действий.docx\"}',	NULL,	1,	1,	'1727425213',	2),
(2,	NULL,	'test',	'{\"doc\":\"36520_План действий.docx\",\"srok\":\"28.09.2024\",\"target_user\":\"1\",\"prioritet\":\"0\"}',	NULL,	1,	1,	'1727425486',	2),
(3,	NULL,	'2313\r\n123123\r\n123123\r\nwerwerfw',	'{\"doc\":\"93485_Руш.aab\",\"srok\":\"28.09.2024\",\"target_user\":\"1\",\"prioritet\":\"0\"}',	NULL,	1,	1,	'1727427187',	2);

DROP TABLE IF EXISTS `content_category`;
CREATE TABLE `content_category` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `title` varchar(100) NOT NULL,
  `txt` longtext DEFAULT NULL,
  `content_type` int(10) NOT NULL,
  `parent` int(10) DEFAULT NULL,
  `status` int(1) NOT NULL DEFAULT 1,
  `t` varchar(40) NOT NULL,
  `user` int(10) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `user` (`user`),
  KEY `content_type` (`content_type`),
  CONSTRAINT `content_category_ibfk_1` FOREIGN KEY (`user`) REFERENCES `users` (`id`),
  CONSTRAINT `content_category_ibfk_2` FOREIGN KEY (`content_type`) REFERENCES `content_type` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf32 COLLATE=utf32_general_ci;


DROP TABLE IF EXISTS `content_type`;
CREATE TABLE `content_type` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `code` varchar(20) NOT NULL,
  `txt` varchar(200) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf32 COLLATE=utf32_general_ci;

INSERT INTO `content_type` (`id`, `code`, `txt`) VALUES
(1,	'news',	'Новости'),
(2,	'task',	'Задачи');

DROP TABLE IF EXISTS `location`;
CREATE TABLE `location` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `kotpus` varchar(30) DEFAULT NULL,
  `etazh` int(2) DEFAULT NULL,
  `kabinet` int(3) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf32 COLLATE=utf32_general_ci;


DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `login` varchar(50) DEFAULT NULL,
  `fio` varchar(100) DEFAULT NULL,
  `korpus` varchar(20) DEFAULT NULL,
  `etazh` int(2) DEFAULT NULL,
  `kabinet` int(4) DEFAULT NULL,
  `dostup` varchar(1) DEFAULT NULL,
  `pwd` varchar(100) DEFAULT NULL,
  `dolznost` varchar(100) DEFAULT NULL,
  `status` varchar(100) DEFAULT '1',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf32 COLLATE=utf32_general_ci;

INSERT INTO `users` (`id`, `login`, `fio`, `korpus`, `etazh`, `kabinet`, `dostup`, `pwd`, `dolznost`, `status`) VALUES
(1,	'admin',	'Евдокимов Юрий Владимирович',	'8',	6,	611,	'a',	'202cb962ac59075b964b07152d234b70',	'ИТ',	'1');

-- 2024-09-27 10:24:22
