parent
4b5976e9fa
commit
e803be5122
@ -0,0 +1,481 @@
|
|||||||
|
-- MySQL dump 10.13 Distrib 8.0.32, for Win64 (x86_64)
|
||||||
|
--
|
||||||
|
-- Host: 127.0.0.1 Database: dbdesign
|
||||||
|
-- ------------------------------------------------------
|
||||||
|
-- Server version 8.0.32
|
||||||
|
|
||||||
|
/*!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 utf8mb4 */;
|
||||||
|
/*!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 */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Temporary view structure for view `administrators`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `administrators`;
|
||||||
|
/*!50001 DROP VIEW IF EXISTS `administrators`*/;
|
||||||
|
SET @saved_cs_client = @@character_set_client;
|
||||||
|
/*!50503 SET character_set_client = utf8mb4 */;
|
||||||
|
/*!50001 CREATE VIEW `administrators` AS SELECT
|
||||||
|
1 AS `Sid`,
|
||||||
|
1 AS `Sname`,
|
||||||
|
1 AS `Susername`*/;
|
||||||
|
SET character_set_client = @saved_cs_client;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `booking_client`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `booking_client`;
|
||||||
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!50503 SET character_set_client = utf8mb4 */;
|
||||||
|
CREATE TABLE `booking_client` (
|
||||||
|
`cid` varchar(255) NOT NULL,
|
||||||
|
`rid` varchar(255) NOT NULL,
|
||||||
|
`start_time` date DEFAULT NULL,
|
||||||
|
`end_time` date DEFAULT NULL,
|
||||||
|
`booking_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||||
|
`remark` varchar(255) DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`cid`,`rid`),
|
||||||
|
KEY `rid` (`rid`),
|
||||||
|
CONSTRAINT `booking_client_ibfk_1` FOREIGN KEY (`cid`) REFERENCES `client` (`cid`),
|
||||||
|
CONSTRAINT `booking_client_ibfk_2` FOREIGN KEY (`rid`) REFERENCES `room` (`rid`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
||||||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `booking_client`
|
||||||
|
--
|
||||||
|
|
||||||
|
LOCK TABLES `booking_client` WRITE;
|
||||||
|
/*!40000 ALTER TABLE `booking_client` DISABLE KEYS */;
|
||||||
|
INSERT INTO `booking_client` VALUES ('131989238123991309','203','2024-01-06','2024-01-08','2024-06-03 05:02:12','不错');
|
||||||
|
/*!40000 ALTER TABLE `booking_client` ENABLE KEYS */;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `booking_team`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `booking_team`;
|
||||||
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!50503 SET character_set_client = utf8mb4 */;
|
||||||
|
CREATE TABLE `booking_team` (
|
||||||
|
`tid` varchar(255) NOT NULL,
|
||||||
|
`rid` varchar(255) NOT NULL,
|
||||||
|
`start_time` date DEFAULT NULL,
|
||||||
|
`end_time` date DEFAULT NULL,
|
||||||
|
`booking_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||||
|
`remark` varchar(255) DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`tid`,`rid`),
|
||||||
|
KEY `rid` (`rid`),
|
||||||
|
CONSTRAINT `booking_team_ibfk_1` FOREIGN KEY (`tid`) REFERENCES `team` (`tid`),
|
||||||
|
CONSTRAINT `booking_team_ibfk_2` FOREIGN KEY (`rid`) REFERENCES `room` (`rid`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
||||||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `booking_team`
|
||||||
|
--
|
||||||
|
|
||||||
|
LOCK TABLES `booking_team` WRITE;
|
||||||
|
/*!40000 ALTER TABLE `booking_team` DISABLE KEYS */;
|
||||||
|
INSERT INTO `booking_team` VALUES ('55','303','2024-01-06','2024-01-10','2024-06-03 05:02:03','新客户'),('55','305','2024-01-06','2024-01-10','2024-06-03 05:02:03','新客户'),('7','301','2024-01-10','2024-01-15','2024-06-03 05:02:03','可能晚一些'),('7','303','2024-01-10','2024-01-15','2024-06-03 05:02:03',NULL);
|
||||||
|
/*!40000 ALTER TABLE `booking_team` ENABLE KEYS */;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `checkin_client`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `checkin_client`;
|
||||||
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!50503 SET character_set_client = utf8mb4 */;
|
||||||
|
CREATE TABLE `checkin_client` (
|
||||||
|
`rid` varchar(255) NOT NULL,
|
||||||
|
`cid` varchar(255) NOT NULL,
|
||||||
|
`start_time` date DEFAULT NULL,
|
||||||
|
`end_time` date DEFAULT NULL,
|
||||||
|
`total_price` varchar(255) DEFAULT NULL,
|
||||||
|
`check_in_sid` varchar(255) DEFAULT NULL,
|
||||||
|
`remark` varchar(255) DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`rid`,`cid`),
|
||||||
|
KEY `cid` (`cid`),
|
||||||
|
KEY `check_in_sid` (`check_in_sid`),
|
||||||
|
CONSTRAINT `checkin_client_ibfk_1` FOREIGN KEY (`rid`) REFERENCES `room` (`rid`),
|
||||||
|
CONSTRAINT `checkin_client_ibfk_2` FOREIGN KEY (`cid`) REFERENCES `client` (`cid`),
|
||||||
|
CONSTRAINT `checkin_client_ibfk_3` FOREIGN KEY (`check_in_sid`) REFERENCES `staff` (`sid`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
||||||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `checkin_client`
|
||||||
|
--
|
||||||
|
|
||||||
|
LOCK TABLES `checkin_client` WRITE;
|
||||||
|
/*!40000 ALTER TABLE `checkin_client` DISABLE KEYS */;
|
||||||
|
INSERT INTO `checkin_client` VALUES ('201','189322199312262232','2024-01-06','2024-01-07','208','1','新客');
|
||||||
|
/*!40000 ALTER TABLE `checkin_client` ENABLE KEYS */;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||||
|
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||||
|
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
|
||||||
|
/*!50003 SET character_set_client = utf8mb3 */ ;
|
||||||
|
/*!50003 SET character_set_results = utf8mb3 */ ;
|
||||||
|
/*!50003 SET collation_connection = utf8mb3_general_ci */ ;
|
||||||
|
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||||
|
/*!50003 SET sql_mode = 'ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION' */ ;
|
||||||
|
DELIMITER ;;
|
||||||
|
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `update_individual_times` AFTER INSERT ON `checkin_client` FOR EACH ROW update client set accomodation_times=accomodation_times+1 where cid=new.cid */;;
|
||||||
|
DELIMITER ;
|
||||||
|
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||||
|
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
||||||
|
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||||
|
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `checkin_team`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `checkin_team`;
|
||||||
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!50503 SET character_set_client = utf8mb4 */;
|
||||||
|
CREATE TABLE `checkin_team` (
|
||||||
|
`rid` varchar(255) NOT NULL,
|
||||||
|
`tid` varchar(255) NOT NULL,
|
||||||
|
`start_time` date DEFAULT NULL,
|
||||||
|
`end_time` date DEFAULT NULL,
|
||||||
|
`total_price` varchar(255) DEFAULT NULL,
|
||||||
|
`check_in_sid` varchar(255) DEFAULT NULL,
|
||||||
|
`remark` varchar(255) DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`rid`,`tid`),
|
||||||
|
KEY `teamsid` (`check_in_sid`),
|
||||||
|
KEY `teamtid` (`tid`),
|
||||||
|
CONSTRAINT `teamrid` FOREIGN KEY (`rid`) REFERENCES `room` (`rid`),
|
||||||
|
CONSTRAINT `teamsid` FOREIGN KEY (`check_in_sid`) REFERENCES `staff` (`sid`),
|
||||||
|
CONSTRAINT `teamtid` FOREIGN KEY (`tid`) REFERENCES `team` (`tid`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
||||||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `checkin_team`
|
||||||
|
--
|
||||||
|
|
||||||
|
LOCK TABLES `checkin_team` WRITE;
|
||||||
|
/*!40000 ALTER TABLE `checkin_team` DISABLE KEYS */;
|
||||||
|
INSERT INTO `checkin_team` VALUES ('404','30','2024-01-05','2024-01-06','2940','8',NULL),('406','30','2024-01-05','2024-01-06','2940','8','团队入住');
|
||||||
|
/*!40000 ALTER TABLE `checkin_team` ENABLE KEYS */;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||||
|
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||||
|
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
|
||||||
|
/*!50003 SET character_set_client = utf8mb3 */ ;
|
||||||
|
/*!50003 SET character_set_results = utf8mb3 */ ;
|
||||||
|
/*!50003 SET collation_connection = utf8mb3_general_ci */ ;
|
||||||
|
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||||
|
/*!50003 SET sql_mode = 'ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION' */ ;
|
||||||
|
DELIMITER ;;
|
||||||
|
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `update_team_times` AFTER INSERT ON `checkin_team` FOR EACH ROW update team set accomodation_times=accomodation_times+1 where tid=new.tid */;;
|
||||||
|
DELIMITER ;
|
||||||
|
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||||
|
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
||||||
|
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||||
|
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `client`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `client`;
|
||||||
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!50503 SET character_set_client = utf8mb4 */;
|
||||||
|
CREATE TABLE `client` (
|
||||||
|
`cname` varchar(255) NOT NULL,
|
||||||
|
`cid` varchar(255) NOT NULL,
|
||||||
|
`cphone` varchar(255) DEFAULT NULL,
|
||||||
|
`cage` varchar(255) NOT NULL,
|
||||||
|
`csex` varchar(255) DEFAULT NULL,
|
||||||
|
`register_sid` varchar(255) DEFAULT NULL,
|
||||||
|
`accomodation_times` int DEFAULT NULL,
|
||||||
|
`register_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||||
|
PRIMARY KEY (`cid`),
|
||||||
|
KEY `sid` (`register_sid`),
|
||||||
|
KEY `cid` (`cid`,`register_sid`),
|
||||||
|
CONSTRAINT `sid` FOREIGN KEY (`register_sid`) REFERENCES `staff` (`sid`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
||||||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `client`
|
||||||
|
--
|
||||||
|
|
||||||
|
LOCK TABLES `client` WRITE;
|
||||||
|
/*!40000 ALTER TABLE `client` DISABLE KEYS */;
|
||||||
|
INSERT INTO `client` VALUES ('宋江','130898199212233434','13898322223','28','男','4',1,'2024-01-04 10:48:42'),('吴用','131989238123991309','13123323212','52','男','7',1,'2024-01-04 09:24:48'),('武松','189322199312262232','13098722343','27','男','4',1,'2024-01-06 00:17:20'),('李逵','289193212393128999','13310913888','50','男','6',0,'2024-01-04 09:16:01'),('鲁智深','290389199412280303','13898767890','26','男','5',0,'2024-01-04 09:15:32'),('杨志','320198199812243456','13789098789','21','男','5',3,'2024-01-04 10:06:33'),('林冲','320222199102036712','13821322312','23','男','8',2,'2024-01-04 09:24:42'),('张顺','320678199012243333','13765434212','30','男','2',0,'2024-01-04 09:12:44'),('时迁','320876196510200099','13876534543','55','男','1',0,'2024-01-04 09:12:26'),('卢俊义','320897189722334567','13987667890','30','男','2',1,'2024-01-04 10:09:29'),('孙二娘','320987199012234444','19876556789','30','女','3',3,'2024-01-04 09:24:50');
|
||||||
|
/*!40000 ALTER TABLE `client` ENABLE KEYS */;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Temporary view structure for view `customers`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `customers`;
|
||||||
|
/*!50001 DROP VIEW IF EXISTS `customers`*/;
|
||||||
|
SET @saved_cs_client = @@character_set_client;
|
||||||
|
/*!50503 SET character_set_client = utf8mb4 */;
|
||||||
|
/*!50001 CREATE VIEW `customers` AS SELECT
|
||||||
|
1 AS `Cid`,
|
||||||
|
1 AS `Cname`,
|
||||||
|
1 AS `Csex`,
|
||||||
|
1 AS `Cphone`*/;
|
||||||
|
SET character_set_client = @saved_cs_client;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `hotelorder`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `hotelorder`;
|
||||||
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!50503 SET character_set_client = utf8mb4 */;
|
||||||
|
CREATE TABLE `hotelorder` (
|
||||||
|
`id` varchar(255) NOT NULL,
|
||||||
|
`ordertype` varchar(255) NOT NULL,
|
||||||
|
`start_time` date NOT NULL,
|
||||||
|
`end_time` date NOT NULL,
|
||||||
|
`rid` varchar(255) NOT NULL,
|
||||||
|
`pay_type` varchar(255) DEFAULT NULL,
|
||||||
|
`money` varchar(255) DEFAULT NULL,
|
||||||
|
`remark` varchar(255) DEFAULT NULL,
|
||||||
|
`order_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||||
|
`register_sid` varchar(255) DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`id`,`start_time`,`end_time`,`rid`,`ordertype`),
|
||||||
|
KEY `rid` (`rid`),
|
||||||
|
KEY `register_sid` (`register_sid`),
|
||||||
|
CONSTRAINT `hotelorder_ibfk_1` FOREIGN KEY (`rid`) REFERENCES `room` (`rid`),
|
||||||
|
CONSTRAINT `hotelorder_ibfk_2` FOREIGN KEY (`register_sid`) REFERENCES `staff` (`sid`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
||||||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `hotelorder`
|
||||||
|
--
|
||||||
|
|
||||||
|
LOCK TABLES `hotelorder` WRITE;
|
||||||
|
/*!40000 ALTER TABLE `hotelorder` DISABLE KEYS */;
|
||||||
|
INSERT INTO `hotelorder` VALUES ('1','团队','2024-01-06','2024-01-09','307','微信','624','','2024-06-03 05:03:39','2'),('1','团队','2024-01-06','2024-01-09','308','微信','2064','','2024-06-03 05:03:39','2'),('130898199212233434','个人','2024-01-04','2024-01-07','201','微信','624','垃圾','2024-06-03 05:03:39','1'),('30','团队','2023-12-21','2023-12-31','406','支付宝','5555','好评','2024-06-03 05:03:39','2'),('30','团队','2023-12-30','2024-01-01','203','支付宝','221','好评','2024-06-03 05:03:39','2'),('30','团队','2024-01-03','2024-01-03','201','支付宝','231','好评','2024-06-03 05:03:39','1'),('320222199102036712','个人','2024-01-02','2024-01-03','406','微信','1176','好评','2024-06-03 05:03:39','4'),('320222199102036788','个人','2024-01-03','2024-01-03','201','微信','5616','好评','2024-06-03 05:03:39','3'),('320897189722334567','个人','2024-01-04','2024-01-05','404','微信','1764','打赏','2024-06-03 05:03:39','1'),('330987126376589900','个人','2024-01-05','2024-01-06','301','微信','208','好评','2024-06-03 05:03:39','2'),('43','团队','2024-01-04','2024-01-06','307','微信','624','垃圾','2024-06-03 05:03:09','1'),('43','团队','2024-01-04','2024-01-06','402','微信','804','垃圾','2024-06-03 05:03:09','1'),('7','团队','2024-01-01','2024-01-02','201','微信','258','中评','2024-06-03 05:03:09','5');
|
||||||
|
/*!40000 ALTER TABLE `hotelorder` ENABLE KEYS */;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Temporary view structure for view `living`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `living`;
|
||||||
|
/*!50001 DROP VIEW IF EXISTS `living`*/;
|
||||||
|
SET @saved_cs_client = @@character_set_client;
|
||||||
|
/*!50503 SET character_set_client = utf8mb4 */;
|
||||||
|
/*!50001 CREATE VIEW `living` AS SELECT
|
||||||
|
1 AS `Cid`,
|
||||||
|
1 AS `Rid`,
|
||||||
|
1 AS `start_time`,
|
||||||
|
1 AS `end_time`,
|
||||||
|
1 AS `total_price`*/;
|
||||||
|
SET character_set_client = @saved_cs_client;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `room`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `room`;
|
||||||
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!50503 SET character_set_client = utf8mb4 */;
|
||||||
|
CREATE TABLE `room` (
|
||||||
|
`rid` varchar(255) NOT NULL,
|
||||||
|
`rtype` varchar(255) NOT NULL,
|
||||||
|
`rstorey` varchar(255) NOT NULL,
|
||||||
|
`rprice` varchar(255) NOT NULL,
|
||||||
|
`rdesc` varchar(255) DEFAULT NULL,
|
||||||
|
`rpic` varchar(255) DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`rid`),
|
||||||
|
KEY `rid` (`rid`,`rprice`),
|
||||||
|
KEY `rid_2` (`rid`,`rprice`,`rtype`),
|
||||||
|
KEY `rid_3` (`rid`,`rtype`,`rprice`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
||||||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `room`
|
||||||
|
--
|
||||||
|
|
||||||
|
LOCK TABLES `room` WRITE;
|
||||||
|
/*!40000 ALTER TABLE `room` DISABLE KEYS */;
|
||||||
|
INSERT INTO `room` VALUES ('201','标准间(单人)','2','208','电视故障','D:/pictures/ss.jpg'),('203','标准间(单人)','2','208','无','D:/pictures/ss.jpg'),('205','标准间(双人)','2','268','没事','D:/pictures/sd.jpg'),('207','标准间(双人)','2','268','采光好','D:/pictures/sd.jpg'),('301','标准间(单人)','3','208','采光好','D:/pictures/ss.jpg'),('303','大床房','3','258','无','D:/pictures/b.jpg'),('305','大床房','3','258','设施新','D:/pictures/b.jpg'),('307','标准间(单人)','3','208','设施新','D:/pictures/ss.jpg'),('308','总统套房','3','688','古典','D:/pictures/pr1.jpg'),('402','标准间(双人)','4','268','空调故障','D:/pictures/sd.jpg'),('404','总统套房','4','588','好评率高','D:/pictures/pr1.jpg'),('406','总统套房','4','588','好评率高','D:/pictures/pr2.jpg'),('410','标准间(单人)','4','232','新房','D:/pictures/ss.jpg');
|
||||||
|
/*!40000 ALTER TABLE `room` ENABLE KEYS */;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Temporary view structure for view `rooms`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `rooms`;
|
||||||
|
/*!50001 DROP VIEW IF EXISTS `rooms`*/;
|
||||||
|
SET @saved_cs_client = @@character_set_client;
|
||||||
|
/*!50503 SET character_set_client = utf8mb4 */;
|
||||||
|
/*!50001 CREATE VIEW `rooms` AS SELECT
|
||||||
|
1 AS `Rid`,
|
||||||
|
1 AS `Rtype`,
|
||||||
|
1 AS `Rprice`,
|
||||||
|
1 AS `Rstorey`*/;
|
||||||
|
SET character_set_client = @saved_cs_client;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `staff`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `staff`;
|
||||||
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!50503 SET character_set_client = utf8mb4 */;
|
||||||
|
CREATE TABLE `staff` (
|
||||||
|
`sid` varchar(255) NOT NULL,
|
||||||
|
`sname` varchar(255) NOT NULL,
|
||||||
|
`ssex` varchar(255) DEFAULT NULL,
|
||||||
|
`stime` date DEFAULT NULL,
|
||||||
|
`susername` varchar(255) NOT NULL,
|
||||||
|
`spassword` varchar(255) NOT NULL,
|
||||||
|
`srole` varchar(255) NOT NULL,
|
||||||
|
`sidcard` varchar(255) NOT NULL,
|
||||||
|
`sphone` varchar(255) DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`sid`),
|
||||||
|
UNIQUE KEY `susername` (`susername`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
||||||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `staff`
|
||||||
|
--
|
||||||
|
|
||||||
|
LOCK TABLES `staff` WRITE;
|
||||||
|
/*!40000 ALTER TABLE `staff` DISABLE KEYS */;
|
||||||
|
INSERT INTO `staff` VALUES ('1','张三','男','2021-06-18','zhangsan','123456','2','4305*************','182****6647'),('2','李四','女','2003-12-06','lisi','123456','1','4305*************','182****6647'),('3','王麻子','男','1981-12-26','wangmz','123456','1','4305*************','182****6647'),('4','赵六','女','1999-01-01','zl123','123456','1','4305*************','182****6647'),('5','王五','男','1997-01-01','wang123','123456','1','4305*************','182****6647'),('6','黄七','男','2002-01-01','hq123','123456','1','4305*************','182****6647'),('7','欧阳毅','男','1975-10-04','oyy123','123456','2','4305*************','182****6647'),('8','Jack','男','1990-12-02','jack123','123456','1','4305*************','182****6647');
|
||||||
|
/*!40000 ALTER TABLE `staff` ENABLE KEYS */;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `team`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `team`;
|
||||||
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!50503 SET character_set_client = utf8mb4 */;
|
||||||
|
CREATE TABLE `team` (
|
||||||
|
`tname` varchar(255) NOT NULL,
|
||||||
|
`tid` varchar(255) NOT NULL,
|
||||||
|
`tphone` varchar(255) DEFAULT NULL,
|
||||||
|
`check_in_sid` varchar(255) DEFAULT NULL,
|
||||||
|
`accomodation_times` int DEFAULT NULL,
|
||||||
|
`register_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||||
|
PRIMARY KEY (`tid`),
|
||||||
|
KEY `team_sid` (`check_in_sid`),
|
||||||
|
CONSTRAINT `team_sid` FOREIGN KEY (`check_in_sid`) REFERENCES `staff` (`sid`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
||||||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `team`
|
||||||
|
--
|
||||||
|
|
||||||
|
LOCK TABLES `team` WRITE;
|
||||||
|
/*!40000 ALTER TABLE `team` DISABLE KEYS */;
|
||||||
|
INSERT INTO `team` VALUES ('阿里巴巴','1','135****8652','1',2,'2024-06-03 04:57:09'),('字节跳动','11','145****8569','6',0,'2024-06-03 04:57:09'),('美团','16','134****6654','3',0,'2024-06-03 04:57:09'),('新浪','30','187****5696','1',5,'2024-06-03 04:57:09'),('华为','32','134****6654','2',0,'2024-06-03 04:57:09'),('腾讯','43','134****6654','1',3,'2024-06-03 04:57:09'),('网易','55','134****6654','2',0,'2024-06-03 04:57:09'),('百度','7','134****6654','6',1,'2024-06-03 04:57:09'),('京东','8','134****6654','4',0,'2024-06-03 04:57:09');
|
||||||
|
/*!40000 ALTER TABLE `team` ENABLE KEYS */;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Final view structure for view `administrators`
|
||||||
|
--
|
||||||
|
|
||||||
|
/*!50001 DROP VIEW IF EXISTS `administrators`*/;
|
||||||
|
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
||||||
|
/*!50001 SET @saved_col_connection = @@collation_connection */;
|
||||||
|
/*!50001 SET character_set_client = utf8mb4 */;
|
||||||
|
/*!50001 SET character_set_results = utf8mb4 */;
|
||||||
|
/*!50001 SET collation_connection = utf8mb4_0900_ai_ci */;
|
||||||
|
/*!50001 CREATE ALGORITHM=UNDEFINED */
|
||||||
|
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
|
||||||
|
/*!50001 VIEW `administrators` AS select `staff`.`sid` AS `Sid`,`staff`.`sname` AS `Sname`,`staff`.`susername` AS `Susername` from `staff` where (`staff`.`srole` > 1) */;
|
||||||
|
/*!50001 SET character_set_client = @saved_cs_client */;
|
||||||
|
/*!50001 SET character_set_results = @saved_cs_results */;
|
||||||
|
/*!50001 SET collation_connection = @saved_col_connection */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Final view structure for view `customers`
|
||||||
|
--
|
||||||
|
|
||||||
|
/*!50001 DROP VIEW IF EXISTS `customers`*/;
|
||||||
|
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
||||||
|
/*!50001 SET @saved_col_connection = @@collation_connection */;
|
||||||
|
/*!50001 SET character_set_client = utf8mb4 */;
|
||||||
|
/*!50001 SET character_set_results = utf8mb4 */;
|
||||||
|
/*!50001 SET collation_connection = utf8mb4_0900_ai_ci */;
|
||||||
|
/*!50001 CREATE ALGORITHM=UNDEFINED */
|
||||||
|
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
|
||||||
|
/*!50001 VIEW `customers` AS select `client`.`cid` AS `Cid`,`client`.`cname` AS `Cname`,`client`.`csex` AS `Csex`,`client`.`cphone` AS `Cphone` from `client` */;
|
||||||
|
/*!50001 SET character_set_client = @saved_cs_client */;
|
||||||
|
/*!50001 SET character_set_results = @saved_cs_results */;
|
||||||
|
/*!50001 SET collation_connection = @saved_col_connection */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Final view structure for view `living`
|
||||||
|
--
|
||||||
|
|
||||||
|
/*!50001 DROP VIEW IF EXISTS `living`*/;
|
||||||
|
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
||||||
|
/*!50001 SET @saved_col_connection = @@collation_connection */;
|
||||||
|
/*!50001 SET character_set_client = utf8mb4 */;
|
||||||
|
/*!50001 SET character_set_results = utf8mb4 */;
|
||||||
|
/*!50001 SET collation_connection = utf8mb4_0900_ai_ci */;
|
||||||
|
/*!50001 CREATE ALGORITHM=UNDEFINED */
|
||||||
|
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
|
||||||
|
/*!50001 VIEW `living` AS select `checkin_client`.`cid` AS `Cid`,`checkin_client`.`rid` AS `Rid`,`checkin_client`.`start_time` AS `start_time`,`checkin_client`.`end_time` AS `end_time`,`checkin_client`.`total_price` AS `total_price` from `checkin_client` */;
|
||||||
|
/*!50001 SET character_set_client = @saved_cs_client */;
|
||||||
|
/*!50001 SET character_set_results = @saved_cs_results */;
|
||||||
|
/*!50001 SET collation_connection = @saved_col_connection */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Final view structure for view `rooms`
|
||||||
|
--
|
||||||
|
|
||||||
|
/*!50001 DROP VIEW IF EXISTS `rooms`*/;
|
||||||
|
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
||||||
|
/*!50001 SET @saved_col_connection = @@collation_connection */;
|
||||||
|
/*!50001 SET character_set_client = utf8mb4 */;
|
||||||
|
/*!50001 SET character_set_results = utf8mb4 */;
|
||||||
|
/*!50001 SET collation_connection = utf8mb4_0900_ai_ci */;
|
||||||
|
/*!50001 CREATE ALGORITHM=UNDEFINED */
|
||||||
|
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
|
||||||
|
/*!50001 VIEW `rooms` AS select `room`.`rid` AS `Rid`,`room`.`rtype` AS `Rtype`,`room`.`rprice` AS `Rprice`,`room`.`rstorey` AS `Rstorey` from `room` */;
|
||||||
|
/*!50001 SET character_set_client = @saved_cs_client */;
|
||||||
|
/*!50001 SET character_set_results = @saved_cs_results */;
|
||||||
|
/*!50001 SET collation_connection = @saved_col_connection */;
|
||||||
|
/*!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 2024-06-03 14:04:04
|
Loading…
Reference in new issue