--
-- Host: 127.0.0.1    Database: idviajero_app
-- ------------------------------------------------------


--
-- Table structure for table `_prisma_migrations`
--

CREATE TABLE `_prisma_migrations` (
  `id` varchar(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `checksum` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,
  `finished_at` datetime(3) DEFAULT NULL,
  `migration_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `logs` text COLLATE utf8mb4_unicode_ci,
  `rolled_back_at` datetime(3) DEFAULT NULL,
  `started_at` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
  `applied_steps_count` int unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `_prisma_migrations`
--

INSERT INTO `_prisma_migrations` VALUES ('fb6a87b3-181c-4dd2-8273-c86ebc046369','aa20376c1921f060b44b3132161b07fc96e372b71e01af2a632eafbd46305ecb','2026-05-31 23:39:55.694','20260531230000_init_mysql',NULL,NULL,'2026-05-31 23:39:50.452',1);

--
-- Table structure for table `agency`
--

CREATE TABLE `agency` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `logoUrl` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `taxId` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `address` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `phone` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `whatsapp` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `ownerName` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `ownerEmail` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `ownerPhone` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `licenseId` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'ACTIVE',
  `billingCutoffDay` int DEFAULT NULL,
  `invoiceCreationDay` int DEFAULT NULL,
  `loginPassword` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `createdAt` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
  `updatedAt` datetime(3) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `Agency_licenseId_fkey` (`licenseId`),
  CONSTRAINT `Agency_licenseId_fkey` FOREIGN KEY (`licenseId`) REFERENCES `license` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `agency`
--

INSERT INTO `agency` VALUES ('cmpsxvy2d0005qcspp06kg14x','Viajes Demo','/uploads/12d6a890-77e8-4df6-bead-601c536a5fc4.jpeg','VDE010101AAA','Av. Reforma 100, CDMX','+52 55 1234 5678','contacto@viajesdemo.mx','+525512345678','Mar├¡a L├│pez','maria@viajesdemo.mx','+52 55 8765 4321','cmpsxvxxe0001qcspyo829vzx','ACTIVE',2,1,NULL,'2026-05-30 22:45:39.253','2026-05-31 21:51:20.343'),('cmpubllqi0001akspo8i4wsj5','Viajes Nomada','/uploads/ba7e2756-b9e7-4578-81fd-7c63d7a109f3.png','AOPA870809723','avenida real pacifico','6951094709','korn_aldo@hotmail.com','+526951094709','Dorjean Aguilar','korn_aldo@hotmail.com','6951094709','cmpsxvxx30000qcsp48yz2g96','ACTIVE',5,2,NULL,'2026-05-31 21:57:17.514','2026-05-31 22:02:31.691');

--
-- Table structure for table `bracelet`
--

CREATE TABLE `bracelet` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `agencyId` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `travelerId` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `number` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `nfcWritten` tinyint(1) NOT NULL DEFAULT '0',
  `createdAt` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
  `updatedAt` datetime(3) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `Bracelet_agencyId_fkey` (`agencyId`),
  KEY `Bracelet_travelerId_fkey` (`travelerId`),
  CONSTRAINT `Bracelet_agencyId_fkey` FOREIGN KEY (`agencyId`) REFERENCES `agency` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `Bracelet_travelerId_fkey` FOREIGN KEY (`travelerId`) REFERENCES `traveler` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `bracelet`
--

INSERT INTO `bracelet` VALUES ('cmpt5h6r2000dtsspblwzzijv','cmpsxvy2d0005qcspp06kg14x','cmpt52f7q0001tsspjffo2dw1','1',0,'2026-05-31 02:18:07.598','2026-05-31 02:18:07.598');

--
-- Table structure for table `document`
--

CREATE TABLE `document` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `travelerId` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `assignmentId` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'OTHER',
  `title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `fileUrl` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `mimeType` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `createdAt` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
  PRIMARY KEY (`id`),
  KEY `Document_travelerId_fkey` (`travelerId`),
  KEY `Document_assignmentId_fkey` (`assignmentId`),
  CONSTRAINT `Document_assignmentId_fkey` FOREIGN KEY (`assignmentId`) REFERENCES `tripassignment` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `Document_travelerId_fkey` FOREIGN KEY (`travelerId`) REFERENCES `traveler` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `document`
--

INSERT INTO `document` VALUES ('cmpt5ge1l000ctsspcy11gvp2','cmpt52f7q0001tsspjffo2dw1','cmpt590ce000atssptmhuofn5','FLIGHT','Vuelo Cmdx-Espa├▒a','/uploads/2bb64926-b36f-43a2-9c8c-efe484f19777.pdf',NULL,'2026-05-31 02:17:30.393');

--
-- Table structure for table `emergencycontact`
--

CREATE TABLE `emergencycontact` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `travelerId` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `relationship` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `country` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `phone` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `EmergencyContact_travelerId_fkey` (`travelerId`),
  CONSTRAINT `EmergencyContact_travelerId_fkey` FOREIGN KEY (`travelerId`) REFERENCES `traveler` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `emergencycontact`
--

INSERT INTO `emergencycontact` VALUES ('cmpsxvy7a0009qcsprdc0qhxf','cmpsxvy780007qcspsdx5ckje','Ana P├®rez','Esposa',NULL,'+52 55 3333 4444',NULL),('cmpt52f7s0003tsspz35j8qo2','cmpt52f7q0001tsspjffo2dw1','Aldo Acosta','Hermano',NULL,'6951094709','aldo@hotmail.com');

--
-- Table structure for table `invoice`
--

CREATE TABLE `invoice` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `number` int NOT NULL,
  `cutoffDate` datetime(3) NOT NULL,
  `agencyId` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `licenseId` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `licenseName` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `priceUsd` double NOT NULL DEFAULT '0',
  `exchangeRate` double NOT NULL DEFAULT '0',
  `costMxn` double NOT NULL DEFAULT '0',
  `status` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'UNPAID',
  `receiptUrl` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `paymentMethod` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `submittedAt` datetime(3) DEFAULT NULL,
  `paidAt` datetime(3) DEFAULT NULL,
  `createdAt` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
  PRIMARY KEY (`id`),
  UNIQUE KEY `Invoice_number_key` (`number`),
  KEY `Invoice_agencyId_fkey` (`agencyId`),
  CONSTRAINT `Invoice_agencyId_fkey` FOREIGN KEY (`agencyId`) REFERENCES `agency` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `invoice`
--

INSERT INTO `invoice` VALUES ('cmpubas990000aksp4v9jbg4i',1,'2026-06-01 19:00:00.000','cmpsxvy2d0005qcspp06kg14x','cmpsxvxxe0001qcspyo829vzx','Basica',20,17.347676,346.95,'PAID','/uploads/0e3018a1-6f71-46ec-98c6-1bd74c6633fb.png','TRANSFERENCIA','2026-05-31 21:50:50.397','2026-05-31 21:51:20.334','2026-05-31 21:48:52.750'),('cmpubm7ce0003aksp1i3usoui',2,'2026-06-04 19:00:00.000','cmpubllqi0001akspo8i4wsj5','cmpsxvxx30000qcsp48yz2g96','Demo',0,17.347676,0,'UNPAID',NULL,NULL,NULL,NULL,'2026-05-31 21:57:45.518'),('cmpubrmtx0004akspz8er02fk',3,'2026-07-29 19:00:00.000','cmpubllqi0001akspo8i4wsj5','cmpsxvxx30000qcsp48yz2g96','Demo',0,17.347676,0,'UNPAID',NULL,NULL,NULL,NULL,'2026-05-31 22:01:58.870');

--
-- Table structure for table `itineraryday`
--

CREATE TABLE `itineraryday` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `tripId` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `date` datetime(3) DEFAULT NULL,
  `title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `order` int NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `ItineraryDay_tripId_fkey` (`tripId`),
  CONSTRAINT `ItineraryDay_tripId_fkey` FOREIGN KEY (`tripId`) REFERENCES `trip` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `itineraryday`
--

INSERT INTO `itineraryday` VALUES ('cmpsxvy7n000dqcspjwn0n0yo','cmpsxvy7l000aqcsph7dpo3yu','2026-07-01 00:00:00.000','Llegada y Torre Eiffel',1),('cmpt544be0005tsspkop3yjmo','cmpsxvy7l000aqcsph7dpo3yu','2026-05-31 00:00:00.000','Dia dos',2),('cmpt57dyf0008tsspnmkdkvyf','cmpt572ui0007tsspajaucawj','2026-07-07 00:00:00.000','DIA UNO',1),('cmpu6btwc0006f8spevsiw8y3','cmpt572ui0007tsspajaucawj','2026-07-07 00:00:00.000','Dia 2',2);

--
-- Table structure for table `itineraryitem`
--

CREATE TABLE `itineraryitem` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `dayId` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `time` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `location` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `order` int NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `ItineraryItem_dayId_fkey` (`dayId`),
  CONSTRAINT `ItineraryItem_dayId_fkey` FOREIGN KEY (`dayId`) REFERENCES `itineraryday` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `itineraryitem`
--

INSERT INTO `itineraryitem` VALUES ('cmpsxvy7o000eqcspvdy060i2','cmpsxvy7n000dqcspjwn0n0yo','10:00','Llegada al hotel',NULL,NULL,1),('cmpsxvy7o000fqcspvq5y5p5n','cmpsxvy7n000dqcspjwn0n0yo','16:00','Visita Torre Eiffel',NULL,'Champ de Mars',2),('cmpt53vwg0004tsspsky2m06e','cmpsxvy7n000dqcspjwn0n0yo','10:00','Tour por estadio','iremos a un juego','Paris',3),('cmpt54uck0006tsspq63zjzzb','cmpt544be0005tsspkop3yjmo','12:00','llegada a saint germain','Tener a la mano sus tickets','Saint germain',1),('cmpt57vt50009tsspz8nnngau','cmpt57dyf0008tsspnmkdkvyf','10:00','Llegada al hotel','llevar reservacion','Barza hotel',1),('cmpu67iv90000f8sp3kfyy3c3','cmpt57dyf0008tsspnmkdkvyf','11:00','Desayuno bienvenida',NULL,'Restaurant del hotel',2),('cmpu67txm0001f8spdhekoezt','cmpt57dyf0008tsspnmkdkvyf','12:00','Reunion',NULL,'Lobby',3),('cmpu68gf90002f8spckrw824d','cmpt57dyf0008tsspnmkdkvyf','13:00','Reunion en alberca','Llevar traje de ba├▒o','alberca 2',4),('cmpu691530003f8sp584ie2l4','cmpt57dyf0008tsspnmkdkvyf','15:00','Comida','Vestimenta formal','Restaurant',5),('cmpu6b0wu0004f8spapq83r93','cmpt57dyf0008tsspnmkdkvyf','17:00','Libre','2 horas para pasear','Ciudad',6),('cmpu6bcda0005f8spjaxtckqi','cmpt57dyf0008tsspnmkdkvyf','20:00','Cena','Vestimenta formal','Hotel',7),('cmpu6c7dm0007f8sp2oniil2a','cmpu6btwc0006f8spevsiw8y3','7:00','Reunion','Puntuales','Lobby',1),('cmpu6cvg90008f8sphq5j859d','cmpu6btwc0006f8spevsiw8y3','9:00','Desayuno','buffet','Hector bistro',2);

--
-- Table structure for table `license`
--

CREATE TABLE `license` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `maxTravelers` int NOT NULL,
  `price` double NOT NULL DEFAULT '0',
  `rank` int NOT NULL DEFAULT '0',
  `active` tinyint(1) NOT NULL DEFAULT '1',
  `createdAt` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
  `updatedAt` datetime(3) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `License_name_key` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `license`
--

INSERT INTO `license` VALUES ('cmpsxvxx30000qcsp48yz2g96','Demo',1,0,1,1,'2026-05-30 22:45:39.063','2026-05-31 20:33:00.205'),('cmpsxvxxe0001qcspyo829vzx','Basica',25,20,2,1,'2026-05-30 22:45:39.074','2026-05-31 20:35:04.414'),('cmpsxvxxj0002qcsp4ui91zgx','Empresarial',500,50,3,1,'2026-05-30 22:45:39.079','2026-05-31 20:36:21.195'),('cmpsxvxxn0003qcspkdd2zibs','Ilimitada',100000,100,4,1,'2026-05-30 22:45:39.083','2026-05-31 20:37:00.038');

--
-- Table structure for table `payment`
--

CREATE TABLE `payment` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `assignmentId` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `amount` double NOT NULL,
  `date` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
  `method` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `note` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `Payment_assignmentId_fkey` (`assignmentId`),
  CONSTRAINT `Payment_assignmentId_fkey` FOREIGN KEY (`assignmentId`) REFERENCES `tripassignment` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `payment`
--


--
-- Table structure for table `traveler`
--

CREATE TABLE `traveler` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `agencyId` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `firstName` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `lastName` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `photoUrl` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `birthDate` datetime(3) DEFAULT NULL,
  `gender` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `phone` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `passportNumber` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `nationality` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `residenceCountry` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `language` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'es',
  `bloodType` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `allergies` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `conditions` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `medications` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `medicalNotes` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `publicToken` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `createdAt` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
  `updatedAt` datetime(3) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `Traveler_publicToken_key` (`publicToken`),
  KEY `Traveler_agencyId_fkey` (`agencyId`),
  CONSTRAINT `Traveler_agencyId_fkey` FOREIGN KEY (`agencyId`) REFERENCES `agency` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `traveler`
--

INSERT INTO `traveler` VALUES ('cmpsxvy780007qcspsdx5ckje','cmpsxvy2d0005qcspp06kg14x','Juan','P├®rez',NULL,NULL,NULL,'juan@example.com','+52 55 1111 2222',NULL,'MX','MX','es','O+','Penicilina',NULL,NULL,NULL,'cmpsxvy780008qcspbbh9proj','2026-05-30 22:45:39.428','2026-05-30 22:45:39.428'),('cmpt52f7q0001tsspjffo2dw1','cmpsxvy2d0005qcspp06kg14x','Roberto carlos','Martinez','/uploads/1d1fe3a4-d39a-4389-abca-f71335f50991.jpg','2026-06-16 00:00:00.000','M','korn_aldo@hotmail.com','6951098383','9382938729','MX','MX','es','A+','penicilina','Dermatitis','paracetamol','No transfucciones sanguineas','cmpt52f7q0002tssp67w0jf38','2026-05-31 02:06:38.726','2026-05-31 02:06:38.726');

--
-- Table structure for table `trip`
--

CREATE TABLE `trip` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `agencyId` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `destinationCountry` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `originCountry` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `startDate` datetime(3) DEFAULT NULL,
  `endDate` datetime(3) DEFAULT NULL,
  `baseCost` double NOT NULL DEFAULT '0',
  `currencyFrom` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `currencyTo` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `exchangeRate` double DEFAULT NULL,
  `description` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `createdAt` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
  `updatedAt` datetime(3) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `Trip_agencyId_fkey` (`agencyId`),
  CONSTRAINT `Trip_agencyId_fkey` FOREIGN KEY (`agencyId`) REFERENCES `agency` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `trip`
--

INSERT INTO `trip` VALUES ('cmpsxvy7l000aqcsph7dpo3yu','cmpsxvy2d0005qcspp06kg14x','Par├¡s M├ígico 2026','FR','MX','2026-07-01 00:00:00.000','2026-07-10 00:00:00.000',45000,'MXN','EUR',NULL,'Viaje grupal a Par├¡s con visitas guiadas.','2026-05-30 22:45:39.441','2026-05-30 22:45:39.441'),('cmpt572ui0007tsspajaucawj','cmpsxvy2d0005qcspp06kg14x','Espa├▒a romantico','ES','MX','2026-07-24 00:00:00.000','2026-08-07 00:00:00.000',50000,'MXN','EUR',NULL,'Conoce espa├▒a en 7 dias','2026-05-31 02:10:15.978','2026-05-31 02:10:15.978');

--
-- Table structure for table `tripassignment`
--

CREATE TABLE `tripassignment` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `tripId` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `travelerId` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `cost` double NOT NULL DEFAULT '0',
  `createdAt` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
  PRIMARY KEY (`id`),
  UNIQUE KEY `TripAssignment_tripId_travelerId_key` (`tripId`,`travelerId`),
  KEY `TripAssignment_travelerId_fkey` (`travelerId`),
  CONSTRAINT `TripAssignment_travelerId_fkey` FOREIGN KEY (`travelerId`) REFERENCES `traveler` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `TripAssignment_tripId_fkey` FOREIGN KEY (`tripId`) REFERENCES `trip` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `tripassignment`
--

INSERT INTO `tripassignment` VALUES ('cmpt590ce000atssptmhuofn5','cmpt572ui0007tsspajaucawj','cmpt52f7q0001tsspjffo2dw1',50000,'2026-05-31 02:11:46.046'),('cmpt597hp000btssp8zvj6hlw','cmpt572ui0007tsspajaucawj','cmpsxvy780007qcspsdx5ckje',30000,'2026-05-31 02:11:55.309'),('cmpu761d50009f8sph4wuurqt','cmpsxvy7l000aqcsph7dpo3yu','cmpt52f7q0001tsspjffo2dw1',45000,'2026-05-31 19:53:12.809'),('cmpu7g60i000af8sp019db8d7','cmpsxvy7l000aqcsph7dpo3yu','cmpsxvy780007qcspsdx5ckje',45000,'2026-05-31 20:01:05.394');

--
-- Table structure for table `tripemergencynumber`
--

CREATE TABLE `tripemergencynumber` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `tripId` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `label` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `phone` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `country` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `TripEmergencyNumber_tripId_fkey` (`tripId`),
  CONSTRAINT `TripEmergencyNumber_tripId_fkey` FOREIGN KEY (`tripId`) REFERENCES `trip` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `tripemergencynumber`
--

INSERT INTO `tripemergencynumber` VALUES ('cmpsxvy7m000bqcsp7fj95hka','cmpsxvy7l000aqcsph7dpo3yu','Polic├¡a','17','FR'),('cmpsxvy7m000cqcsprp8f79c4','cmpsxvy7l000aqcsph7dpo3yu','Emergencias','112','FR'),('cmpu3ajj800009ssp0q0vn8u1','cmpt572ui0007tsspajaucawj','Policias','912','ES');

--
-- Table structure for table `user`
--

CREATE TABLE `user` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `passwordHash` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `role` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'AGENCY',
  `agencyId` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `createdAt` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
  `updatedAt` datetime(3) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `User_email_key` (`email`),
  KEY `User_agencyId_fkey` (`agencyId`),
  CONSTRAINT `User_agencyId_fkey` FOREIGN KEY (`agencyId`) REFERENCES `agency` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `user`
--

INSERT INTO `user` VALUES ('cmpsxvy1v0004qcsp5yfvg5gv','admin@viajes.app','$2b$10$6WnsZ3wnphLVwsXnWXbX0ujEPRSYm7fuD09IUaHIQO97iyqixHOre','Super Administrador','SUPERADMIN',NULL,'2026-05-30 22:45:39.235','2026-05-30 22:45:39.235'),('cmpsxvy6d0006qcsp349uuzb5','agencia@viajes.app','$2b$10$24dj6Y3j4Xd7iRoTd4IsEeds6WdNlz7CzilKxCfz5xE6yrFtzU4Aq','Mar├¡a L├│pez','AGENCY','cmpsxvy2d0005qcspp06kg14x','2026-05-30 22:45:39.397','2026-05-30 22:45:39.397'),('cmpubllyc0002aksprv228x5w','korn_aldo@hotmail.com','$2b$10$8Oy3TasKAv65gDeMWxQBBunGyCDBEucmPp1m51/RkyM9b6OUwFm9G','Dorjean Aguilar','AGENCY','cmpubllqi0001akspo8i4wsj5','2026-05-31 21:57:17.796','2026-05-31 21:57:17.796');

--
-- Dumping routines for database 'idviajero_app'
--


