forked from alura-challenges/challenge-one-alura-hotel-latam
-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.sql
85 lines (74 loc) · 3.95 KB
/
schema.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
-- MariaDB dump 10.19 Distrib 10.5.18-MariaDB, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: hotel
-- ------------------------------------------------------
-- Server version 10.5.18-MariaDB-0+deb11u1
/*!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 */;
/*!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 */;
--
-- Table structure for table `huespedes`
--
DROP TABLE IF EXISTS `huespedes`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `huespedes` (
`Id` bigint(20) NOT NULL AUTO_INCREMENT,
`apellido` varchar(255) DEFAULT NULL,
`fechaNacimiento` date DEFAULT NULL,
`nacionalidad` varchar(255) DEFAULT NULL,
`nombre` varchar(255) DEFAULT NULL,
`telefono` varchar(255) DEFAULT NULL,
PRIMARY KEY (`Id`)
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `huespedes`
--
LOCK TABLES `huespedes` WRITE;
/*!40000 ALTER TABLE `huespedes` DISABLE KEYS */;
INSERT INTO `huespedes` VALUES (18,'Guemes','1980-04-05','mexicano-mexicana','Lorenzo','010-021-4334732'),(19,'Jofr','2001-06-23','argentino-argentina','Carina','872-477421'),(20,'Sarmiento','1994-12-03','chileno-chilena','vcdsfs','354-03-757754'),(21,'Antoni','1983-05-13','afgano-afgana','Marcos','1122233444'),(22,'Satre','1984-04-05','argentino-argentina','Ivan Roberto','55456656'),(23,'Victorino','1999-05-08','afgano-afgana','Jorge','332323');
/*!40000 ALTER TABLE `huespedes` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `reservas`
--
DROP TABLE IF EXISTS `reservas`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `reservas` (
`Id` bigint(20) NOT NULL AUTO_INCREMENT,
`fechaEntrada` date DEFAULT NULL,
`fechaSalida` date DEFAULT NULL,
`formaPago` varchar(255) DEFAULT NULL,
`valor` decimal(19,2) DEFAULT NULL,
`huesped_Id` bigint(20) DEFAULT NULL,
PRIMARY KEY (`Id`),
KEY `FKcp1j1g2i5qj32myag2fvtm5kk` (`huesped_Id`),
CONSTRAINT `FKcp1j1g2i5qj32myag2fvtm5kk` FOREIGN KEY (`huesped_Id`) REFERENCES `huespedes` (`Id`)
) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `reservas`
--
LOCK TABLES `reservas` WRITE;
/*!40000 ALTER TABLE `reservas` DISABLE KEYS */;
INSERT INTO `reservas` VALUES (23,'2023-06-01','2023-06-10','Tarjeta de Débito',1330.00,18),(24,'2023-07-10','2023-07-13','Dinero en efectivo',3000.00,19),(25,'2023-08-20','2023-08-21','Tarjeta de Crédito',300.00,20),(26,'2023-09-13','2023-09-14','Tarjeta de Crédito',300.00,20),(27,'2023-05-02','2023-05-07','Tarjeta de Débito',5000.00,NULL),(28,'2023-05-09','2023-05-13','Tarjeta de Débito',4000.00,21),(29,'2023-05-24','2023-05-26','Tarjeta de Débito',2000.00,22),(30,'2023-05-09','2023-05-11','Tarjeta de Débito',2000.00,23);
/*!40000 ALTER TABLE `reservas` ENABLE KEYS */;
UNLOCK TABLES;
/*!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 2023-05-01 17:22:35