--
-- Host: localhost    Database: kran
-- ------------------------------------------------------


--
-- Current Database: `kran`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `kran` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci */;

USE `kran`;

--
-- Table structure for table `admin`
--

CREATE TABLE `admin` (
  `id` int(20) NOT NULL AUTO_INCREMENT,
  `senaste` date NOT NULL,
  `footer` longtext NOT NULL,
  `version` text NOT NULL,
  `auto` int(25) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `admin`
--

INSERT INTO `admin` VALUES
(1,'2025-12-01','Design och programering av Hans Engfeldt Copyright © 2025','V.3.0',0);

--
-- Table structure for table `device_tokens`
--

CREATE TABLE `device_tokens` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `token` varchar(255) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `tocken` (`token`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `device_tokens`
--


--
-- Table structure for table `fel`
--

CREATE TABLE `fel` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `kran` text NOT NULL,
  `rubrik` text NOT NULL,
  `inlagg` longtext NOT NULL,
  `bild1` varchar(255) DEFAULT NULL,
  `bild2` varchar(255) DEFAULT NULL,
  `bild3` varchar(255) DEFAULT NULL,
  `bild4` varchar(255) DEFAULT NULL,
  `bild5` varchar(255) DEFAULT NULL,
  `insant` text NOT NULL,
  `datum` date NOT NULL,
  `kommentar` text DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `slutdatum` date DEFAULT NULL,
  `startdatum` date DEFAULT NULL,
  `arendenr` varchar(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `arendenr` (`arendenr`)
) ENGINE=InnoDB AUTO_INCREMENT=128 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `fel`
--

INSERT INTO `fel` VALUES
(40,'Arlövskranen','Hjulplatta på fast sida ','På fast sida, andra boggien från Malmö (har jag för mig) har vi fått hjulplatta på ett av hjulen. Orsak okänd. ','../uploads/1000010592.jpg','',NULL,NULL,NULL,'Maz','2024-10-09','','Nytt','2025-09-30',NULL,'241009-2'),
(116,'Malmökranen','Damasker','Damasker är trasiga','../uploads/17284752220488063714475341121123.jpg','../uploads/17284752317348451410795765991945.jpg','','','','Hans Engfeldt','2024-10-09','Tar med nya nästa gång','Pågående','2025-10-30','2025-09-26','241009-1');

--
-- Table structure for table `mail`
--

CREATE TABLE `mail` (
  `id` int(6) unsigned NOT NULL AUTO_INCREMENT,
  `till` varchar(30) DEFAULT NULL,
  `avsandare` varchar(30) DEFAULT NULL,
  `sender` varchar(30) DEFAULT NULL,
  `port` varchar(30) DEFAULT NULL,
  `user` varchar(30) DEFAULT NULL,
  `pass` varchar(30) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `mail`
--

INSERT INTO `mail` VALUES
(1,'hansengfeldt@gmail.com','noreply@engfeldt.st','mailout.privat.bahnhof.se','465','mc344084','He35273527');

--
-- Table structure for table `ticket`
--

CREATE TABLE `ticket` (
  `id` int(20) NOT NULL AUTO_INCREMENT,
  `name` text NOT NULL,
  `epost` text NOT NULL,
  `rubrik` text NOT NULL,
  `subject` longtext NOT NULL,
  `tid` text NOT NULL,
  `status` text NOT NULL,
  `subjectnr` text NOT NULL,
  `svar` longtext DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `ticket`
--


--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `id` int(20) NOT NULL AUTO_INCREMENT,
  `fornamn` text NOT NULL,
  `efternamn` text NOT NULL,
  `email` text DEFAULT NULL,
  `username` text NOT NULL,
  `password` text NOT NULL,
  `admin` text NOT NULL,
  `webmin` text DEFAULT NULL,
  `senast` text NOT NULL,
  `online` text NOT NULL,
  `antal` int(20) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=38 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `users`
--

INSERT INTO `users` VALUES
(1,'Hans','Engfeldt','hansengfeldt@gmail.com','hasse','$2y$10$C71RWjxWn19nZxcf.29HV.3/OI.OE1Pi0DQLzLgtsvMqBYhslIb72','Ja','Ja','2026-02-26 12:56:42','Nej',3),
(13,'Mats','Nilsson',NULL,'Mats','$2y$10$T9mVve8wJ0lnp9qV81WR0OwyE7NSr64TOkqWdcE08xsZz2GbCJv.u','Ja','Nej','2024-10-14 07:39:37','Ja',0),
(15,'Marie','Svensson',NULL,'Marie','$2y$10$modNFlPbCZ9UABTgDh3u5OdxrFjKIkRSqf6LkH9slbTstxQb8Jf5e','Nej','Nej','0','Nej',0),
(16,'Alexander','Ekdahl ','','Alexander','$2y$10$eE9q7JyfGYRW1Ecm5j4TkuhG.0n/kqQyWVtb3z0mK/1qanHluPvTe','Nej','Nej','0','Nej',0),
(17,'Anders','Levau',NULL,'Anders','$2y$10$PxxRCNS62Ek9F53cQsCWSupCnnBxNLOg.F59uo2SQSsrq.9fzNGIC','Nej','Nej','0','Nej',0),
(18,'Melker','Gustavsson',NULL,'Melker','$2y$10$xGhEQ7DzIkWpNEf43m6Ua.o6/h5cj.yItV/kmvBgDY.u/P5JkmoM6','Nej','Nej','0','Nej',0),
(19,'Henrik','Andersson',NULL,'Henrik','$2y$10$KP1gX9l4eoKFbe3FjpLj/u5sk9.cSzy3qfyg9AwMJL.5jiQhr29/2','Nej','Nej','0','Nej',0),
(21,'Philip','Lindskog',NULL,'Philip','$2y$10$jsHx7bQcQD/I9pUDa7pBHeGgo.JeZGTDSSCdEJJleTrAO6G0UCtYu','Nej','Nej','0','Nej',0),
(22,'Pioter','Okomonievski',NULL,'Pioter','$2y$10$KbkEQFBSo0MVwaL7QhwBqe.Y9DvyuUUfY/FAODJDu3m3ZprXOSol.','Nej','Nej','0','Nej',0),
(23,'Hampus','Hellman',NULL,'Hampus','$2y$10$9Ih8ZkJHCgBgFEFOe4ux3uBIf.0DBeMvBiSKEftVPfT/cGs58v9F2','Nej',NULL,'0','Nej',0),
(27,'Christoffer','Larsen',NULL,'Christoffer','$2y$10$y5qITqIwvKhrJwTWilUYV.QWmX8TlGNKqxZE/xtsgymEpLzpYhoaa','Nej','Nej','0','Nej',0),
(29,'Oliver','Sjögren',NULL,'Oliver','$2y$10$dEMbCdopHnDYZywwrGBwpevDwR0x7eqSkwnayqfTURZMUdL7Z4OMO','Nej','Nej','0','Nej',0),
(30,'Sebastian','Molin',NULL,'SebastiaM','$2y$10$3FvfQZbgymPw8qscyd7kzOU3pW5GW0gj1v.J9GxR1rrN.2rOHJfWu','Nej','Nej','0','Nej',0),
(31,'Mickael','Holmgren',NULL,'Michael','$2y$10$HVTeyyCNw71FtroyzeQsIO1A6qNT.axurya9oXMkt0KFsK3pJuiZW','Nej','Nej','0','Nej',0),
(32,'Thomas','Frej','','Thomas','$2y$10$Rn17d5iVhHDPpgJ0hV/gmeQk6Fk1TDTOwXy70DECEZk2byQdAHzMm','Ja','Nej','0','Nej',0),
(33,'Marcus','Frej',NULL,'Marcus','$2y$10$bPGonfzGUqjWw5mO.IDH4ei1HrPEkewNM6kVXQRJfue3kyng0b/1m','Nej','Nej','0','Nej',0),
(35,'Nicklas','Rosén',NULL,'Nicklas','$2y$10$KzSoWLh5vBw5qPEjRGckL.YssAf/3SyUMs/A10pUgSuu9yUBAd7ai','Ja','Nej','0','Nej',0),
(36,'Mattias ','Sarvin',NULL,'Mattias.s','$2y$10$NBekJ3f5jy2b4crc6B8NTuUMWDIQZGNIbCbs/ci97p188Hfz85Q2.','Ja','Nej','0','Nej',0);


