DROP TABLE company;

CREATE TABLE `company` (
  `company_id` bigint(22) NOT NULL AUTO_INCREMENT,
  `company_name` varchar(100) NOT NULL,
  `company_category` varchar(50) DEFAULT NULL,
  `company_adress` varchar(200) DEFAULT NULL,
  `company_contact` varchar(100) NOT NULL,
  `company_telephone` varchar(20) DEFAULT NULL,
  `company_postAdress` varchar(50) DEFAULT NULL,
  `company_procentRabatt` int(11) NOT NULL,
  `IDnation` int(11) NOT NULL,
  `samlingsfaktura` tinyint(1) NOT NULL,
  PRIMARY KEY (`company_id`)
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8;

INSERT INTO company VALUES("1","DVVJ","station","Stationsgatan 5","Frank","01225","66630 BENGTSFORS","10","1","0");
INSERT INTO company VALUES("2","Silverlake","turistfirma","Stenbro 5","christer","12345","66630 Bengtsfors","10","1","1");
INSERT INTO company VALUES("3","Privatkund","Privatkund","","Privatkund","","","0","1","0");



DROP TABLE dressPerUt;

CREATE TABLE `dressPerUt` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `Dressin_id` int(11) NOT NULL,
  `IDut` int(11) NOT NULL,
  UNIQUE KEY `ID` (`ID`) USING BTREE,
  KEY `IDut` (`IDut`),
  KEY `DressPerUt` (`Dressin_id`)
) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8;

INSERT INTO dressPerUt VALUES("8","12","7");
INSERT INTO dressPerUt VALUES("9","13","7");
INSERT INTO dressPerUt VALUES("10","33","7");
INSERT INTO dressPerUt VALUES("11","6","7");
INSERT INTO dressPerUt VALUES("12","5","15");
INSERT INTO dressPerUt VALUES("13","7","15");
INSERT INTO dressPerUt VALUES("14","21","15");
INSERT INTO dressPerUt VALUES("15","22","15");
INSERT INTO dressPerUt VALUES("16","23","15");
INSERT INTO dressPerUt VALUES("17","14","9");
INSERT INTO dressPerUt VALUES("18","4","9");
INSERT INTO dressPerUt VALUES("19","11","10");
INSERT INTO dressPerUt VALUES("20","17","10");
INSERT INTO dressPerUt VALUES("21","32","10");
INSERT INTO dressPerUt VALUES("22","2","21");
INSERT INTO dressPerUt VALUES("23","9","20");
INSERT INTO dressPerUt VALUES("24","3","20");
INSERT INTO dressPerUt VALUES("25","16","20");
INSERT INTO dressPerUt VALUES("26","28","20");
INSERT INTO dressPerUt VALUES("27","30","20");



DROP TABLE dressin;

CREATE TABLE `dressin` (
  `IDdressin` int(11) NOT NULL AUTO_INCREMENT,
  `Status` varchar(20) NOT NULL,
  `SlutOrtID` int(11) NOT NULL,
  `UtDate` datetime NOT NULL,
  `SlutDate` datetime NOT NULL,
  `Hemort` int(11) NOT NULL,
  `Typ` varchar(11) NOT NULL,
  `Name` varchar(3) NOT NULL,
  UNIQUE KEY `IDdressin_2` (`IDdressin`),
  KEY `IDdressin` (`IDdressin`) USING BTREE,
  KEY `SlutOrtID` (`SlutOrtID`,`Hemort`),
  KEY `Dress_hemOrt` (`Hemort`)
) ENGINE=InnoDB AUTO_INCREMENT=34 DEFAULT CHARSET=utf8;

INSERT INTO dressin VALUES("1","ledig","1","2019-12-21 14:09:30","2019-12-21 14:09:30","1","tandem","A");
INSERT INTO dressin VALUES("2","ledig","2","2020-07-07 12:00:00","2020-06-21 21:55:00","1","enkel","01");
INSERT INTO dressin VALUES("3","ledig","2","2020-06-25 11:00:00","2020-06-21 22:00:00","1","enkel","12");
INSERT INTO dressin VALUES("4","ledig","3","2020-06-02 16:38:00","2020-06-21 21:52:00","1","tandem","B");
INSERT INTO dressin VALUES("5","uthyrd","4","2020-06-26 09:00:00","2020-06-26 17:00:00","1","enkel","02");
INSERT INTO dressin VALUES("6","ledig","1","2020-06-04 03:47:00","2020-06-21 21:55:00","1","enkel","03");
INSERT INTO dressin VALUES("7","uthyrd","4","2020-06-26 09:00:00","2020-06-26 17:00:00","1","enkel","04");
INSERT INTO dressin VALUES("8","uthyrd","2","2020-06-04 03:47:00","2020-06-06 18:47:00","1","enkel","05");
INSERT INTO dressin VALUES("9","uthyrd","1","2020-06-25 11:00:00","2020-06-26 15:00:00","1","enkel","07");
INSERT INTO dressin VALUES("10","uthyrd","2","2020-06-04 03:47:00","2020-06-06 18:47:00","1","enkel","06");
INSERT INTO dressin VALUES("11","uthyrd","2","2020-06-02 19:05:00","2020-06-03 19:05:00","1","enkel","08");
INSERT INTO dressin VALUES("12","ledig","4","2020-06-04 03:47:00","2020-06-21 21:51:00","1","enkel","09");
INSERT INTO dressin VALUES("13","ledig","4","2020-06-04 03:47:00","2020-06-21 21:51:00","1","enkel","10");
INSERT INTO dressin VALUES("14","ledig","1","2020-06-02 16:38:00","2020-06-21 21:55:00","1","enkel","11");
INSERT INTO dressin VALUES("15","uthyrd","2","2020-06-04 03:47:00","2020-06-06 18:47:00","1","enkel","13");
INSERT INTO dressin VALUES("16","ledig","2","2020-06-25 11:00:00","2020-06-21 22:00:00","1","enkel","14");
INSERT INTO dressin VALUES("17","ledig","3","2020-06-02 19:05:00","2020-06-21 21:52:00","1","enkel","15");
INSERT INTO dressin VALUES("18","ledig","1","2020-05-25 08:33:00","2020-05-25 08:33:00","1","enkel","16");
INSERT INTO dressin VALUES("19","ledig","1","2020-05-25 08:33:00","2020-05-25 08:33:00","1","enkel","17");
INSERT INTO dressin VALUES("20","ledig","1","2020-05-25 08:33:00","2020-05-25 08:33:00","1","enkel","18");
INSERT INTO dressin VALUES("21","uthyrd","4","2020-06-26 09:00:00","2020-06-26 17:00:00","1","enkel","19");
INSERT INTO dressin VALUES("22","uthyrd","4","2020-06-26 09:00:00","2020-06-26 17:00:00","1","enkel","20");
INSERT INTO dressin VALUES("23","uthyrd","4","2020-06-26 09:00:00","2020-06-26 17:00:00","1","enkel","21");
INSERT INTO dressin VALUES("24","ledig","1","2020-05-25 08:34:00","2020-05-25 08:34:00","1","enkel","22");
INSERT INTO dressin VALUES("25","ledig","1","2020-05-25 08:34:00","2020-05-25 08:34:00","1","enkel","23");
INSERT INTO dressin VALUES("26","ledig","1","2020-05-25 08:34:00","2020-05-25 08:34:00","1","enkel","24");
INSERT INTO dressin VALUES("27","uthyrd","2","2020-06-04 03:47:00","2020-06-06 18:47:00","1","tandem","C");
INSERT INTO dressin VALUES("28","uthyrd","1","2020-06-25 11:00:00","2020-06-26 15:00:00","1","tandem","D");
INSERT INTO dressin VALUES("29","uthyrd","2","2020-06-04 03:47:00","2020-06-06 18:47:00","1","tandem","E");
INSERT INTO dressin VALUES("30","uthyrd","1","2020-06-25 11:00:00","2020-06-26 15:00:00","1","tandem","F");
INSERT INTO dressin VALUES("31","ledig","1","2020-05-25 08:35:00","2020-05-25 08:35:00","1","tandem","G");
INSERT INTO dressin VALUES("32","ledig","4","2020-06-02 19:05:00","2020-06-21 21:55:00","1","tandem","H");
INSERT INTO dressin VALUES("33","uthyrd","2","2020-06-04 03:47:00","2020-06-06 18:47:00","1","tandem","I");



DROP TABLE eventrequests;

CREATE TABLE `eventrequests` (
  `ID` int(12) NOT NULL AUTO_INCREMENT,
  `description` varchar(1000) NOT NULL,
  `end` datetime NOT NULL,
  `keyEvent` int(12) NOT NULL,
  `start` datetime NOT NULL,
  `title` varchar(255) NOT NULL,
  `email` varchar(100) NOT NULL,
  `enkel` int(3) NOT NULL,
  `tandem` int(3) NOT NULL,
  `startOrtId` int(11) NOT NULL,
  `slutOrtId` int(11) NOT NULL,
  UNIQUE KEY `ID` (`ID`) USING BTREE,
  UNIQUE KEY `ID_2` (`ID`),
  KEY `keyEvent` (`keyEvent`)
) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8;

INSERT INTO eventrequests VALUES("23","nnnnnnnnnnnnnnnnnnnnn","2020-06-16 17:00:00","128","2020-06-16 09:00:00","Dag","irinaha@gmail.com","3","0","4","1");
INSERT INTO eventrequests VALUES("27","","2020-07-09 17:00:00","151","2020-07-09 09:00:00","Dag","irinaha@gmail.com","5","0","4","4");
INSERT INTO eventrequests VALUES("28","nnnnnnnnnnnnnnnnnnnnnn","2020-07-09 17:00:00","151","2020-07-09 09:00:00","Dag","irinaha@gmail.com","0","16","1","3");
INSERT INTO eventrequests VALUES("29","3 vusaaa","2020-06-17 17:00:00","115","2020-06-17 09:00:00","Dag","potypova@gmail.com","0","2","4","1");
INSERT INTO eventrequests VALUES("30","bnn","2020-07-11 17:00:00","153","2020-07-11 09:00:00","Dag","potypova2@gmail.com","0","1","4","1");
INSERT INTO eventrequests VALUES("31","naja","2020-06-18 17:00:00","130","2020-06-18 09:00:00","Dag","potypova2@gmail.com","0","3","4","4");



DROP TABLE events;

CREATE TABLE `events` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `keyEvent` int(12) NOT NULL,
  `title` varchar(255) NOT NULL,
  `description` varchar(255) NOT NULL,
  `start` datetime NOT NULL,
  `end` datetime NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=205 DEFAULT CHARSET=utf8;

INSERT INTO events VALUES("118","118","Dag"," hyr för en dag","2020-06-06 07:00:00","2020-06-06 15:00:00");
INSERT INTO events VALUES("119","119","Dag"," hyr för en dag","2020-06-07 07:00:00","2020-06-07 15:00:00");
INSERT INTO events VALUES("120","120","Dag"," hyr för en dag","2020-06-08 07:00:00","2020-06-08 15:00:00");
INSERT INTO events VALUES("121","121","Dag"," hyr för en dag","2020-06-09 07:00:00","2020-06-09 15:00:00");
INSERT INTO events VALUES("122","122","Dag"," hyr för en dag","2020-06-10 07:00:00","2020-06-10 15:00:00");
INSERT INTO events VALUES("123","123","Dag"," hyr för en dag","2020-06-11 07:00:00","2020-06-11 15:00:00");
INSERT INTO events VALUES("124","124","Dag"," hyr för en dag","2020-06-12 07:00:00","2020-06-12 15:00:00");
INSERT INTO events VALUES("125","125","Dag"," hyr för en dag","2020-06-13 07:00:00","2020-06-13 15:00:00");
INSERT INTO events VALUES("126","126","Dag"," hyr för en dag","2020-06-14 07:00:00","2020-06-14 15:00:00");
INSERT INTO events VALUES("127","127","Dag"," hyr för en dag","2020-06-15 07:00:00","2020-06-15 15:00:00");
INSERT INTO events VALUES("128","128","Dag"," hyr för en dag","2020-06-16 07:00:00","2020-06-16 15:00:00");
INSERT INTO events VALUES("129","129","Dag"," hyr för en dag","2020-06-17 07:00:00","2020-06-17 15:00:00");
INSERT INTO events VALUES("130","130","Dag"," hyr för en dag","2020-06-18 07:00:00","2020-06-18 15:00:00");
INSERT INTO events VALUES("131","131","Dag"," hyr för en dag","2020-06-19 07:00:00","2020-06-19 15:00:00");
INSERT INTO events VALUES("132","132","Dag"," hyr för en dag","2020-06-20 07:00:00","2020-06-20 15:00:00");
INSERT INTO events VALUES("133","133","Dag"," hyr för en dag","2020-06-21 07:00:00","2020-06-21 15:00:00");
INSERT INTO events VALUES("134","134","Dag"," hyr för en dag","2020-06-22 07:00:00","2020-06-22 15:00:00");
INSERT INTO events VALUES("135","135","Dag"," hyr för en dag","2020-06-23 07:00:00","2020-06-23 15:00:00");
INSERT INTO events VALUES("136","136","Dag"," hyr för en dag","2020-06-24 07:00:00","2020-06-24 15:00:00");
INSERT INTO events VALUES("137","137","Dag"," hyr för en dag","2020-06-25 07:00:00","2020-06-25 15:00:00");
INSERT INTO events VALUES("138","138","Dag"," hyr för en dag","2020-06-26 07:00:00","2020-06-26 15:00:00");
INSERT INTO events VALUES("139","139","Dag"," hyr för en dag","2020-06-27 07:00:00","2020-06-27 15:00:00");
INSERT INTO events VALUES("140","140","Dag"," hyr för en dag","2020-06-28 07:00:00","2020-06-28 15:00:00");
INSERT INTO events VALUES("141","141","Dag"," hyr för en dag","2020-06-29 07:00:00","2020-06-29 15:00:00");
INSERT INTO events VALUES("142","142","Dag"," hyr för en dag","2020-06-30 07:00:00","2020-06-30 15:00:00");
INSERT INTO events VALUES("143","143","Dag"," hyr för en dag","2020-07-01 07:00:00","2020-07-01 15:00:00");
INSERT INTO events VALUES("144","144","Dag"," hyr för en dag","2020-07-02 07:00:00","2020-07-02 15:00:00");
INSERT INTO events VALUES("145","145","Dag"," hyr för en dag","2020-07-03 07:00:00","2020-07-03 15:00:00");
INSERT INTO events VALUES("146","146","Dag"," hyr för en dag","2020-07-04 07:00:00","2020-07-04 15:00:00");
INSERT INTO events VALUES("147","147","Dag"," hyr för en dag","2020-07-05 07:00:00","2020-07-05 15:00:00");
INSERT INTO events VALUES("148","148","Dag"," hyr för en dag","2020-07-06 07:00:00","2020-07-06 15:00:00");
INSERT INTO events VALUES("149","149","Dag"," hyr för en dag","2020-07-07 07:00:00","2020-07-07 15:00:00");
INSERT INTO events VALUES("150","150","Dag"," hyr för en dag","2020-07-08 07:00:00","2020-07-08 15:00:00");
INSERT INTO events VALUES("151","151","Dag"," hyr för en dag","2020-07-09 07:00:00","2020-07-09 15:00:00");
INSERT INTO events VALUES("152","152","Dag"," hyr för en dag","2020-07-10 07:00:00","2020-07-10 15:00:00");
INSERT INTO events VALUES("153","153","Dag"," hyr för en dag","2020-07-11 07:00:00","2020-07-11 15:00:00");
INSERT INTO events VALUES("154","154","Dag"," hyr för en dag","2020-07-12 07:00:00","2020-07-12 15:00:00");
INSERT INTO events VALUES("155","155","Dag"," hyr för en dag","2020-07-13 07:00:00","2020-07-13 15:00:00");
INSERT INTO events VALUES("156","156","Dag"," hyr för en dag","2020-07-14 07:00:00","2020-07-14 15:00:00");
INSERT INTO events VALUES("157","157","Dag"," hyr för en dag","2020-07-15 07:00:00","2020-07-15 15:00:00");
INSERT INTO events VALUES("158","158","Dag"," hyr för en dag","2020-07-16 07:00:00","2020-07-16 15:00:00");
INSERT INTO events VALUES("159","159","Dag"," hyr för en dag","2020-07-17 07:00:00","2020-07-17 15:00:00");
INSERT INTO events VALUES("160","160","Dag"," hyr för en dag","2020-07-18 07:00:00","2020-07-18 15:00:00");
INSERT INTO events VALUES("161","161","Dag"," hyr för en dag","2020-07-19 07:00:00","2020-07-19 15:00:00");
INSERT INTO events VALUES("162","162","Dag"," hyr för en dag","2020-07-20 07:00:00","2020-07-20 15:00:00");
INSERT INTO events VALUES("163","163","Dag"," hyr för en dag","2020-07-21 07:00:00","2020-07-21 15:00:00");
INSERT INTO events VALUES("164","164","Dag"," hyr för en dag","2020-07-22 07:00:00","2020-07-22 15:00:00");
INSERT INTO events VALUES("165","165","Dag"," hyr för en dag","2020-07-23 07:00:00","2020-07-23 15:00:00");
INSERT INTO events VALUES("166","166","Dag"," hyr för en dag","2020-07-24 07:00:00","2020-07-24 15:00:00");
INSERT INTO events VALUES("167","167","Dag"," hyr för en dag","2020-07-25 07:00:00","2020-07-25 15:00:00");
INSERT INTO events VALUES("168","168","Dag"," hyr för en dag","2020-07-26 07:00:00","2020-07-26 15:00:00");
INSERT INTO events VALUES("169","169","Dag"," hyr för en dag","2020-07-27 07:00:00","2020-07-27 15:00:00");
INSERT INTO events VALUES("170","170","Dag"," hyr för en dag","2020-07-28 07:00:00","2020-07-28 15:00:00");
INSERT INTO events VALUES("171","171","Dag"," hyr för en dag","2020-07-29 07:00:00","2020-07-29 15:00:00");
INSERT INTO events VALUES("172","172","Dag"," hyr för en dag","2020-07-30 07:00:00","2020-07-30 15:00:00");
INSERT INTO events VALUES("173","173","Dag"," hyr för en dag","2020-07-31 07:00:00","2020-07-31 15:00:00");
INSERT INTO events VALUES("174","174","Dag"," hyr för en dag","2020-08-01 07:00:00","2020-08-01 15:00:00");
INSERT INTO events VALUES("175","175","Dag"," hyr för en dag","2020-08-02 07:00:00","2020-08-02 15:00:00");
INSERT INTO events VALUES("176","176","Dag"," hyr för en dag","2020-08-03 07:00:00","2020-08-03 15:00:00");
INSERT INTO events VALUES("177","177","Dag"," hyr för en dag","2020-08-04 07:00:00","2020-08-04 15:00:00");
INSERT INTO events VALUES("178","178","Dag"," hyr för en dag","2020-08-05 07:00:00","2020-08-05 15:00:00");
INSERT INTO events VALUES("179","179","Dag"," hyr för en dag","2020-08-06 07:00:00","2020-08-06 15:00:00");
INSERT INTO events VALUES("180","180","Dag"," hyr för en dag","2020-08-07 07:00:00","2020-08-07 15:00:00");
INSERT INTO events VALUES("181","181","Dag"," hyr för en dag","2020-08-08 07:00:00","2020-08-08 15:00:00");
INSERT INTO events VALUES("182","182","Dag"," hyr för en dag","2020-08-09 07:00:00","2020-08-09 15:00:00");
INSERT INTO events VALUES("183","183","Dag"," hyr för en dag","2020-08-10 07:00:00","2020-08-10 15:00:00");
INSERT INTO events VALUES("184","184","Dag"," hyr för en dag","2020-08-11 07:00:00","2020-08-11 15:00:00");
INSERT INTO events VALUES("185","185","Dag"," hyr för en dag","2020-08-12 07:00:00","2020-08-12 15:00:00");
INSERT INTO events VALUES("186","186","Dag"," hyr för en dag","2020-08-13 07:00:00","2020-08-13 15:00:00");
INSERT INTO events VALUES("187","187","Dag"," hyr för en dag","2020-08-14 07:00:00","2020-08-14 15:00:00");
INSERT INTO events VALUES("188","188","Dag"," hyr för en dag","2020-08-15 07:00:00","2020-08-15 15:00:00");
INSERT INTO events VALUES("189","189","Dag"," hyr för en dag","2020-08-16 07:00:00","2020-08-16 15:00:00");
INSERT INTO events VALUES("190","190","Dag"," hyr för en dag","2020-08-17 07:00:00","2020-08-17 15:00:00");
INSERT INTO events VALUES("191","191","Dag"," hyr för en dag","2020-08-18 07:00:00","2020-08-18 15:00:00");
INSERT INTO events VALUES("192","192","Dag"," hyr för en dag","2020-08-19 07:00:00","2020-08-19 15:00:00");
INSERT INTO events VALUES("193","193","Dag"," hyr för en dag","2020-08-20 07:00:00","2020-08-20 15:00:00");
INSERT INTO events VALUES("194","194","Dag"," hyr för en dag","2020-08-21 07:00:00","2020-08-21 15:00:00");
INSERT INTO events VALUES("195","195","Dag"," hyr för en dag","2020-08-22 07:00:00","2020-08-22 15:00:00");
INSERT INTO events VALUES("196","196","Dag"," hyr för en dag","2020-08-23 07:00:00","2020-08-23 15:00:00");
INSERT INTO events VALUES("197","197","Dag"," hyr för en dag","2020-08-24 07:00:00","2020-08-24 15:00:00");
INSERT INTO events VALUES("198","198","Dag"," hyr för en dag","2020-08-25 07:00:00","2020-08-25 15:00:00");
INSERT INTO events VALUES("199","199","Dag"," hyr för en dag","2020-08-26 07:00:00","2020-08-26 15:00:00");
INSERT INTO events VALUES("200","200","Dag"," hyr för en dag","2020-08-27 07:00:00","2020-08-27 15:00:00");
INSERT INTO events VALUES("201","201","Dag"," hyr för en dag","2020-08-28 07:00:00","2020-08-28 15:00:00");
INSERT INTO events VALUES("202","202","Dag"," hyr för en dag","2020-08-29 07:00:00","2020-08-29 15:00:00");
INSERT INTO events VALUES("203","203","Dag"," hyr för en dag","2020-08-30 07:00:00","2020-08-30 15:00:00");



DROP TABLE faktura;

CREATE TABLE `faktura` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `faktura_Nr` varchar(20) NOT NULL,
  `faktura_Sum` int(11) NOT NULL,
  `faktura_Date` date NOT NULL,
  `inbetalt_Sum` int(20) NOT NULL,
  `faktura_company` int(20) NOT NULL,
  `faktura_kund` int(11) NOT NULL,
  `personal_id` bigint(20) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8;

INSERT INTO faktura VALUES("13","26","2","2020-06-13","0","2","4","4");
INSERT INTO faktura VALUES("14","20","3756","2020-06-14","0","3","4","4");
INSERT INTO faktura VALUES("16","27","1","2020-06-14","0","3","6","4");
INSERT INTO faktura VALUES("17","21","126","2020-06-14","0","2","4","4");
INSERT INTO faktura VALUES("20","30","88","2020-06-20","0","2","0","4");
INSERT INTO faktura VALUES("21","24","388","2020-06-20","0","1","4","4");



DROP TABLE inbetaltPerUt;

CREATE TABLE `inbetaltPerUt` (
  `ID` int(12) NOT NULL AUTO_INCREMENT,
  `IDut` int(11) DEFAULT NULL,
  `Inbetalt` int(11) DEFAULT NULL,
  `Datum` datetime DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

INSERT INTO inbetaltPerUt VALUES("3","20","1000","2020-06-18 00:00:00");
INSERT INTO inbetaltPerUt VALUES("4","20","1500","2020-06-20 00:00:00");



DROP TABLE nation;

CREATE TABLE `nation` (
  `IDnation` int(11) NOT NULL AUTO_INCREMENT,
  `Nation` varchar(20) NOT NULL,
  UNIQUE KEY `IDnation` (`IDnation`),
  KEY `IDnation_2` (`IDnation`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;

INSERT INTO nation VALUES("1","Sverige");
INSERT INTO nation VALUES("5","England");
INSERT INTO nation VALUES("6","Holland");
INSERT INTO nation VALUES("7","Tyskland");



DROP TABLE nationPerUt;

CREATE TABLE `nationPerUt` (
  `ID` int(12) NOT NULL AUTO_INCREMENT,
  `IDut` int(11) DEFAULT NULL,
  `Nation_id` int(11) DEFAULT NULL,
  `Antal` int(11) DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8;

INSERT INTO nationPerUt VALUES("14","19","5","1");
INSERT INTO nationPerUt VALUES("15","19","1","2");
INSERT INTO nationPerUt VALUES("16","23","5","1");
INSERT INTO nationPerUt VALUES("17","23","1","1");
INSERT INTO nationPerUt VALUES("18","33","5","1");
INSERT INTO nationPerUt VALUES("19","33","1","1");
INSERT INTO nationPerUt VALUES("20","34","5","1");
INSERT INTO nationPerUt VALUES("21","34","6","1");
INSERT INTO nationPerUt VALUES("22","35","6","1");



DROP TABLE ort;

CREATE TABLE `ort` (
  `IDort` int(11) NOT NULL AUTO_INCREMENT,
  `OrtNamn` varchar(100) NOT NULL,
  `description` varchar(255) NOT NULL,
  UNIQUE KEY `IDort` (`IDort`),
  UNIQUE KEY `IDort_2` (`IDort`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

INSERT INTO ort VALUES("1","BENGTSFORS","hemort");
INSERT INTO ort VALUES("2","GUSTAFSFORS","  mellanstation");
INSERT INTO ort VALUES("3","KRÅKVIKEN","..");
INSERT INTO ort VALUES("4"," Årjäng","    Slutstation");



DROP TABLE prisPerTyp;

CREATE TABLE `prisPerTyp` (
  `IDpris` int(11) NOT NULL AUTO_INCREMENT,
  `Year` int(11) NOT NULL,
  `Sasong_id` int(11) NOT NULL,
  `DressinTyp` varchar(11) NOT NULL,
  `Timme` int(11) NOT NULL,
  `Dag` int(11) NOT NULL,
  `Kvall` int(11) NOT NULL,
  `Dygn` int(11) NOT NULL,
  `TransportEnkel` int(11) NOT NULL,
  `TransportTandem` int(11) NOT NULL,
  UNIQUE KEY `IDpris` (`IDpris`),
  KEY `ID` (`IDpris`)
) ENGINE=InnoDB AUTO_INCREMENT=173 DEFAULT CHARSET=utf8;

INSERT INTO prisPerTyp VALUES("3","2020","0","tandem","150","206","180","320","128","168");
INSERT INTO prisPerTyp VALUES("165","2020","15","tandem","167","306","209","320","130","101");
INSERT INTO prisPerTyp VALUES("171","2020","0","enkel","4","2","18","28","1","38");
INSERT INTO prisPerTyp VALUES("172","2020","15","enkel","10","1","10","1","7","61");



DROP TABLE role;

CREATE TABLE `role` (
  `role_id` bigint(20) NOT NULL AUTO_INCREMENT,
  `role_name` varchar(20) NOT NULL,
  PRIMARY KEY (`role_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

INSERT INTO role VALUES("1","privatkund");
INSERT INTO role VALUES("2","turistfirma");
INSERT INTO role VALUES("3","personal");
INSERT INTO role VALUES("4","admin");



DROP TABLE sasong;

CREATE TABLE `sasong` (
  `IDsasong` int(11) NOT NULL AUTO_INCREMENT,
  `Year` int(11) NOT NULL,
  `SasongStart` datetime NOT NULL,
  `SasongEnd` datetime NOT NULL,
  `DagTidStart` int(11) NOT NULL,
  `KvallTidStart` int(11) NOT NULL,
  `KvallTidSlut` int(11) NOT NULL,
  `sasong_typ` int(1) NOT NULL,
  UNIQUE KEY `IDsasong` (`IDsasong`),
  KEY `ID` (`IDsasong`),
  KEY `Year` (`Year`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8;

INSERT INTO sasong VALUES("15","2020","2020-05-22 00:00:00","2020-08-31 00:00:00","9","17","22","1");
INSERT INTO sasong VALUES("17","2022","2021-03-20 00:00:00","2020-08-20 00:00:00","20","20","20","1");



DROP TABLE settings;

CREATE TABLE `settings` (
  `id` int(12) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) DEFAULT NULL,
  `text` text DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8;

INSERT INTO settings VALUES("1"," BG"," 123456");
INSERT INTO settings VALUES("15","Avbokningsregler","I enlighet med gällande överenskommelse som träffats mellan Konsumentverket och Nätverket Svensk Turism om  \'Allmänna villkor för paketresor\' gäller följande regler för avbokning av arrangemang: 
\nOm avbokning sker senare än 14 dagar men tidigare än 24 timmar före arrangemanget debiteras 50 %  av arrangemangets pris.
\nOm avbokning sker under de närmaste 24 timmarna innan arrangemanget debiteras 100 % av arrangemangets pris.");
INSERT INTO settings VALUES("16","Email","info@hagmantrading.se");
INSERT INTO settings VALUES("17"," MOMS registr.nr"," 940003:00");
INSERT INTO settings VALUES("18"," Org.nr"," 56789");



DROP TABLE status;

CREATE TABLE `status` (
  `ID` int(8) NOT NULL AUTO_INCREMENT,
  `Name` varchar(20) DEFAULT NULL,
  PRIMARY KEY (`ID`),
  UNIQUE KEY `ID` (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

INSERT INTO status VALUES("1","ledig");
INSERT INTO status VALUES("2","uthyrd");
INSERT INTO status VALUES("3","ur funktion");



DROP TABLE ut;

CREATE TABLE `ut` (
  `IDut` int(11) NOT NULL AUTO_INCREMENT,
  `IDkund` int(20) NOT NULL,
  `StartOrt` int(11) NOT NULL,
  `SlutOrt` int(11) NOT NULL,
  `OrderSumma` int(11) NOT NULL,
  `IDforetag` int(11) NOT NULL,
  `Faktureras` tinyint(1) NOT NULL,
  `TransportEnkel` int(11) NOT NULL,
  `Enkel` int(11) NOT NULL,
  `Tandem` int(11) NOT NULL,
  `BokDate` datetime NOT NULL,
  `UtDate` datetime NOT NULL,
  `Uthyrd` tinyint(1) NOT NULL,
  `Dygn` int(11) NOT NULL,
  `Dag` int(11) NOT NULL,
  `Kvall` int(11) NOT NULL,
  `Timme` int(11) NOT NULL,
  `AntalPers` int(11) NOT NULL,
  `AntalBarn` int(11) NOT NULL,
  `TransportTandem` int(11) NOT NULL,
  `PersonalID` int(11) NOT NULL,
  `Message` varchar(250) NOT NULL,
  `InDate` datetime NOT NULL,
  `Returnerad` tinyint(1) NOT NULL,
  `Inbetalt` int(11) NOT NULL,
  UNIQUE KEY `IDut` (`IDut`),
  KEY `IDkund` (`IDkund`,`IDforetag`),
  KEY `Ut_foretag` (`IDforetag`),
  KEY `StartOrt` (`StartOrt`,`SlutOrt`),
  KEY `Ut_slutOrt` (`SlutOrt`)
) ENGINE=InnoDB AUTO_INCREMENT=36 DEFAULT CHARSET=utf8;

INSERT INTO ut VALUES("20","4","1","1","3756","3","1","0","0","6","2020-06-14 00:00:00","2020-06-25 11:00:00","1","1","1","0","0","0","0","0","4","","2020-06-26 15:00:00","0","2500");
INSERT INTO ut VALUES("21","4","1","2","126","2","1","1","14","0","2020-06-14 00:00:00","2020-07-07 12:00:00","1","1","1","0","0","0","0","0","4","","2020-07-08 16:00:00","0","0");
INSERT INTO ut VALUES("23","4","1","1","177","1","0","0","1","1","2020-06-07 09:12:00","2020-06-07 15:15:00","0","0","0","0","1","3","2","0","4","","2020-06-07 17:00:00","0","0");
INSERT INTO ut VALUES("24","4","1","1","388","3","1","1","2","1","2020-06-20 00:00:00","2020-06-07 14:12:00","0","0","0","0","2","0","0","0","4","","2020-06-07 16:12:00","0","0");
INSERT INTO ut VALUES("25","4","1","1","3366","1","0","0","0","11","2020-06-07 09:20:00","2020-06-07 11:20:00","0","0","1","0","0","0","0","0","4","","2020-06-07 15:24:00","0","0");
INSERT INTO ut VALUES("26","4","1","3","2","2","1","0","2","0","2020-06-13 00:00:00","2020-06-13 22:01:00","0","1","0","0","0","0","0","0","4","","2020-06-14 22:01:00","0","0");
INSERT INTO ut VALUES("27","6","1","1","1","3","1","0","1","0","2020-06-20 00:00:00","2020-06-14 09:00:00","0","1","0","0","0","0","0","0","4","","2020-06-15 09:00:00","0","0");
INSERT INTO ut VALUES("28","4","1","1","741","1","0","0","0","1","2020-06-15 18:46:00","2020-06-15 20:45:00","1","2","0","0","0","0","0","1","4","","2020-06-17 20:45:00","0","0");
INSERT INTO ut VALUES("29","5","1","2","420","2","0","0","11","1","2020-06-20 11:14:00","2020-06-20 13:11:00","1","0","0","1","0","0","0","1","4","","2020-06-20 18:11:00","0","0");
INSERT INTO ut VALUES("30","7","1","1","64","2","1","1","8","0","2020-06-20 11:25:00","2020-06-20 13:25:00","1","0","1","0","0","0","0","0","4","","2020-06-20 17:25:00","0","0");
INSERT INTO ut VALUES("31","8","2","1","24","2","1","1","3","0","2020-06-20 11:32:00","2020-06-18 13:31:00","1","1","0","0","0","0","0","0","4","","2020-06-19 13:31:00","0","0");
INSERT INTO ut VALUES("32","8","2","3","4","2","0","0","4","0","2020-06-20 12:03:00","2020-06-23 14:02:00","1","1","0","0","0","0","0","0","4","","2020-06-24 14:02:00","0","0");
INSERT INTO ut VALUES("33","4","1","1","10","1","0","0","1","0","2020-06-21 20:09:00","2020-06-21 22:08:00","0","0","0","0","1","2","0","0","4","","2020-06-21 23:08:00","0","0");
INSERT INTO ut VALUES("34","4","1","1","10","1","0","0","1","0","2020-06-21 20:15:00","2020-06-21 22:15:00","0","0","0","0","1","2","0","0","4","","2020-06-21 23:15:00","0","0");
INSERT INTO ut VALUES("35","4","1","1","167","1","0","0","0","1","2020-06-21 20:24:00","2020-06-21 22:17:00","1","0","0","0","1","1","0","0","4","","2020-06-21 23:17:00","0","0");



DROP TABLE utPerFaktura;

CREATE TABLE `utPerFaktura` (
  `ID` bigint(20) NOT NULL AUTO_INCREMENT,
  `faktura_Id` bigint(20) NOT NULL,
  `ut_Id` bigint(20) NOT NULL,
  `faktura_Nr` int(11) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8;

INSERT INTO utPerFaktura VALUES("1","13","26","26");
INSERT INTO utPerFaktura VALUES("5","17","21","21");
INSERT INTO utPerFaktura VALUES("10","20","30","30");
INSERT INTO utPerFaktura VALUES("11","20","31","30");
INSERT INTO utPerFaktura VALUES("12","0","27","27");
INSERT INTO utPerFaktura VALUES("13","0","24","24");



