-- MariaDB dump 10.19  Distrib 10.4.32-MariaDB, for Win64 (AMD64)
--
-- Host: localhost    Database: sistema_carretas
-- ------------------------------------------------------
-- Server version	10.4.32-MariaDB

/*!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 `despesas_viagem`
--

DROP TABLE IF EXISTS `despesas_viagem`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `despesas_viagem` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `viagem_id` int(11) NOT NULL,
  `valor_total` decimal(10,2) NOT NULL,
  `despesas_adicionais` decimal(10,2) NOT NULL DEFAULT 0.00,
  `comissao` decimal(10,2) NOT NULL DEFAULT 0.00,
  `motorista` varchar(255) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `viagem_id` (`viagem_id`),
  CONSTRAINT `despesas_viagem_ibfk_1` FOREIGN KEY (`viagem_id`) REFERENCES `viagens` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `despesas_viagem`
--

LOCK TABLES `despesas_viagem` WRITE;
/*!40000 ALTER TABLE `despesas_viagem` DISABLE KEYS */;
INSERT INTO `despesas_viagem` VALUES (7,199,0.00,750.00,0.00,'RAURE'),(8,198,0.00,331.00,0.00,'RAURE'),(9,197,0.00,0.00,0.00,'RAURE'),(10,200,0.00,0.00,0.00,'CUSTELA'),(11,201,0.00,230.00,0.00,'CUSTELA'),(12,202,0.00,115.00,0.00,'CUSTELA'),(13,203,0.00,0.00,0.00,'CLAUDIO'),(14,204,0.00,3495.90,0.00,'CLAUDIO'),(16,205,0.00,1586.00,0.00,'CLAUDIO'),(17,196,0.00,0.00,0.00,'RAURE');
/*!40000 ALTER TABLE `despesas_viagem` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `viagens`
--

DROP TABLE IF EXISTS `viagens`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `viagens` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `placa` varchar(10) NOT NULL,
  `valor` decimal(10,2) NOT NULL,
  `data_viagem` date NOT NULL,
  `data_criacao` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=206 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `viagens`
--

LOCK TABLES `viagens` WRITE;
/*!40000 ALTER TABLE `viagens` DISABLE KEYS */;
INSERT INTO `viagens` VALUES (1,'PLU0C63',5229.72,'2024-08-01','2025-01-13 10:43:50'),(2,'PLU0C63',3191.10,'2024-08-05','2025-01-13 10:51:13'),(3,'RVP3103',4389.00,'2024-07-31','2025-01-13 10:58:30'),(4,'RVA7A59',2786.50,'2024-08-17','2025-01-13 11:00:02'),(5,'PLU0C63',2218.33,'2024-07-29','2025-01-13 11:00:51'),(6,'PLU0C63',2484.52,'2024-07-24','2025-01-13 11:07:23'),(7,'PLU0C63',5441.63,'2024-08-14','2025-01-13 11:11:22'),(8,'RVA7A59',2300.21,'2024-08-08','2025-01-13 11:16:46'),(9,'RVA7A59',5593.91,'2024-08-13','2025-01-13 11:17:18'),(10,'RVA7A59',3000.00,'2024-08-29','2025-01-13 11:18:55'),(11,'RVP3103',2355.64,'2024-08-19','2025-01-13 11:19:23'),(12,'RVA7A59',5087.28,'2024-08-20','2025-01-13 11:19:54'),(13,'RVP3103',2069.89,'2024-10-04','2025-01-13 11:24:03'),(14,'RVP3103',4459.38,'2024-09-28','2025-01-13 11:24:32'),(15,'RVP3103',5851.26,'2024-09-06','2025-01-13 11:25:04'),(16,'RVP3103',1549.16,'2024-09-18','2025-01-13 11:28:47'),(17,'RVP3103',1457.43,'2024-09-29','2025-01-13 11:29:13'),(18,'RVP3103',3119.73,'2024-09-24','2025-01-13 11:29:52'),(19,'RVP3103',2908.11,'2024-09-11','2025-01-13 11:31:20'),(20,'RVA7A59',3984.28,'2024-09-10','2025-01-13 11:32:44'),(21,'RVP3103',3068.50,'2024-09-29','2025-01-13 11:46:02'),(22,'RVP3103',2937.56,'2024-09-18','2025-01-13 11:46:35'),(23,'RVP3103',1674.00,'2024-09-11','2025-01-13 11:49:06'),(24,'RVP3103',6601.50,'2024-09-15','2025-01-13 11:49:50'),(25,'RVP3103',4828.87,'2024-09-02','2025-01-13 11:50:31'),(26,'RVP3103',4228.40,'2024-09-15','2025-01-13 11:51:28'),(27,'PLU0C63',4752.84,'2024-09-16','2025-01-13 11:52:03'),(28,'PLU0C63',5739.52,'2024-09-25','2025-01-13 12:21:03'),(29,'PLU0C63',3443.37,'2024-09-13','2025-01-13 12:21:32'),(30,'PLU0C63',4157.64,'2024-09-02','2025-01-13 12:24:08'),(31,'PLU0C63',4862.93,'2024-09-07','2025-01-13 12:24:43'),(32,'RVP3103',35000.00,'2024-02-28','2025-01-13 12:28:46'),(33,'PLU0C63',35000.00,'2024-02-28','2025-01-13 12:28:46'),(34,'RVA7A59',35000.00,'2024-02-28','2025-01-13 12:28:46'),(35,'PLU0C63',6538.00,'2024-08-27','2025-01-13 12:32:10'),(36,'PLU0C63',2642.71,'2024-09-24','2025-01-13 12:44:46'),(37,'PLU0C63',2950.57,'2024-09-11','2025-01-13 12:46:29'),(38,'RVA7A59',218.00,'2024-09-09','2025-01-13 12:48:05'),(39,'RVA7A59',4559.96,'2024-09-30','2025-01-13 12:49:43'),(40,'RVA7A59',1979.14,'2024-09-02','2025-01-13 12:50:12'),(41,'PLU0C63',4660.84,'2024-09-30','2025-01-13 12:56:48'),(42,'PLU0C63',3838.70,'2024-09-21','2025-01-13 12:57:19'),(43,'PLU0C63',4399.06,'2024-08-20','2025-01-13 12:59:55'),(44,'PLU0C63',5104.70,'2024-08-10','2025-01-13 13:00:39'),(45,'RVP3103',6131.73,'2024-08-10','2025-01-13 13:01:47'),(46,'RVP3103',4110.01,'2024-08-14','2025-01-13 13:04:56'),(47,'RVP3103',8115.30,'2024-08-26','2025-01-13 13:05:30'),(48,'RVP3103',2178.62,'2024-10-14','2025-01-13 13:08:44'),(49,'RVP3103',7133.55,'2024-10-09','2025-01-13 13:09:11'),(50,'RVP3103',875.60,'2024-10-29','2025-01-13 13:19:37'),(51,'RVP3103',2340.87,'2024-10-25','2025-01-13 13:25:15'),(53,'RVP3103',2775.08,'2024-10-17','2025-01-13 13:27:32'),(54,'PLU0C63',4164.04,'2024-10-24','2025-01-13 13:32:51'),(55,'RVP3103',2521.30,'2024-11-06','2025-01-13 13:37:07'),(56,'PLU0C63',5659.61,'2024-10-14','2025-01-13 13:38:32'),(57,'RVA7A59',2672.10,'2024-10-17','2025-01-13 13:39:05'),(58,'RVP3103',4350.77,'2024-10-11','2025-01-13 13:40:00'),(59,'PLU0C63',3203.93,'2024-10-08','2025-01-13 13:40:23'),(60,'RVP3103',4806.91,'2024-10-04','2025-01-13 13:42:09'),(61,'PLU0C63',3440.13,'2024-10-09','2025-01-13 13:42:34'),(62,'PLU0C63',3195.87,'2024-10-17','2025-01-13 13:43:02'),(63,'RVP3103',4159.89,'2024-10-03','2025-01-13 13:43:40'),(64,'PLU0C63',3472.32,'2024-11-11','2025-01-13 13:45:06'),(65,'PLU0C63',4285.92,'2024-11-14','2025-01-13 13:46:13'),(66,'RVP3103',3627.73,'2024-11-23','2025-01-13 13:46:52'),(67,'RVP3103',2241.46,'2024-12-03','2025-01-13 13:47:23'),(68,'RVP3103',623.46,'2024-12-05','2025-01-13 13:47:56'),(69,'PLU0C63',1492.96,'2024-12-06','2025-01-13 13:48:23'),(70,'RVA7A59',2176.22,'2024-10-23','2025-01-13 13:49:35'),(71,'RVA7A59',2728.28,'2024-11-11','2025-01-13 13:50:09'),(72,'PLU0C63',6044.90,'2024-12-02','2025-01-13 13:50:34'),(73,'PLU0C63',1106.07,'2024-11-27','2025-01-13 13:55:27'),(74,'PLU0C63',3028.89,'2024-11-14','2025-01-13 13:55:58'),(75,'PLU0C63',4289.06,'2024-10-28','2025-01-13 13:57:42'),(76,'RVA7A59',2348.67,'2024-10-28','2025-01-13 13:58:11'),(77,'RVA7A59',1871.79,'2024-11-05','2025-01-13 14:23:53'),(78,'RVA7A59',2218.94,'2024-11-07','2025-01-13 14:24:15'),(79,'PLU0C63',895.00,'2024-11-06','2025-01-13 14:24:32'),(80,'RVP3103',2087.00,'2024-07-24','2025-01-13 14:38:03'),(81,'RVP3103',2595.00,'2024-07-29','2025-01-13 14:56:02'),(82,'RVP3103',3541.05,'2024-07-11','2025-01-13 14:57:31'),(83,'RVP3103',4597.00,'2024-07-09','2025-01-13 14:58:05'),(84,'RVP3103',2608.84,'2024-07-03','2025-01-13 14:58:25'),(85,'RVP3103',2500.00,'2024-07-01','2025-01-13 14:58:45'),(86,'RVP3103',3948.73,'2024-07-20','2025-01-13 15:01:21'),(87,'RVP3103',4433.74,'2024-07-19','2025-01-13 15:01:42'),(88,'RVP3103',1542.52,'2024-07-16','2025-01-13 15:02:19'),(89,'RVP3103',2299.07,'2024-07-01','2025-01-13 16:18:43'),(90,'RVP3103',3152.49,'2024-06-13','2025-01-13 16:21:37'),(91,'RVP3103',3888.84,'2024-06-18','2025-01-13 16:22:29'),(92,'RVP3103',1510.00,'2024-06-24','2025-01-13 16:26:48'),(93,'RVP3103',2577.00,'2024-06-05','2025-01-13 16:27:36'),(94,'RVP3103',2185.73,'2024-06-03','2025-01-13 16:27:58'),(95,'RVP3103',1285.73,'2024-05-03','2025-01-13 16:28:23'),(96,'RVP3103',2460.19,'2024-05-08','2025-01-13 16:29:54'),(97,'RVP3103',3292.73,'2024-05-23','2025-01-13 16:31:14'),(98,'RVP3103',1331.78,'2024-09-22','2025-01-13 16:54:05'),(99,'RVP3103',3139.50,'2024-05-27','2025-01-13 16:54:30'),(100,'RVP3103',1213.96,'2024-05-01','2025-01-13 16:55:21'),(101,'RVP3103',2026.00,'2024-05-13','2025-01-13 16:55:49'),(102,'RVP3103',4201.00,'2024-05-15','2025-01-13 16:56:10'),(103,'RVP3103',2176.30,'2024-05-28','2025-01-13 16:56:29'),(104,'RVP3103',1092.42,'2024-04-29','2025-01-13 16:56:59'),(105,'RVP3103',1387.58,'2024-04-25','2025-01-13 16:57:25'),(106,'RVP3103',3436.00,'2024-04-07','2025-01-13 16:57:57'),(107,'RVP3103',3287.17,'2024-04-17','2025-01-13 16:58:24'),(108,'RVP3103',1828.00,'2024-04-19','2025-01-13 16:58:49'),(109,'RVP3103',1202.51,'2024-04-05','2025-01-13 16:59:11'),(110,'RVP3103',2964.00,'2024-04-02','2025-01-13 16:59:30'),(111,'RVP3103',4567.39,'2024-03-25','2025-01-13 17:00:37'),(113,'RVP3103',3901.85,'2024-03-29','2025-01-13 17:03:39'),(114,'RVP3103',571.16,'2024-01-12','2025-01-13 17:04:07'),(115,'PLU0C63',2558.11,'2024-04-02','2025-01-13 17:20:22'),(116,'PLU0C63',1111.29,'2024-04-26','2025-01-13 17:21:37'),(117,'PLU0C63',1455.16,'2024-04-29','2025-01-13 17:22:13'),(118,'PLU0C63',2565.53,'2024-04-18','2025-01-13 17:22:39'),(119,'PLU0C63',2072.27,'2024-04-15','2025-01-13 17:23:35'),(120,'PLU0C63',2350.79,'2024-04-22','2025-01-13 17:25:14'),(121,'PLU0C63',1414.00,'2024-04-05','2025-01-13 17:27:25'),(122,'PLU0C63',5050.24,'2024-03-25','2025-01-13 17:27:55'),(123,'PLU0C63',4011.61,'2024-03-16','2025-01-13 17:28:18'),(124,'PLU0C63',3400.00,'2024-03-20','2025-01-13 17:30:02'),(125,'PLU0C63',2401.00,'2024-03-28','2025-01-13 17:31:16'),(126,'PLU0C63',369.42,'2024-01-12','2025-01-13 17:31:42'),(127,'RVA7A59',656.08,'2024-09-27','2025-01-13 17:32:36'),(128,'RVA7A59',4323.25,'2024-03-17','2025-01-13 17:33:21'),(129,'RVA7A59',1594.42,'2024-03-21','2025-01-13 17:34:09'),(130,'RVA7A59',4645.17,'2024-03-25','2025-01-13 17:34:57'),(131,'RVA7A59',3217.60,'2024-03-30','2025-01-13 17:35:34'),(132,'RVA7A59',2999.71,'2024-03-28','2025-01-13 17:36:33'),(133,'RVA7A59',670.23,'2024-01-12','2025-01-13 17:39:28'),(134,'RVA7A59',1899.24,'2024-09-29','2025-01-13 17:40:01'),(135,'PLU0C63',3893.67,'2024-04-09','2025-01-13 17:40:50'),(136,'RVA7A59',900.00,'2024-09-05','2025-01-13 17:41:10'),(137,'RVA7A59',2899.19,'2024-04-02','2025-01-13 17:42:21'),(138,'RVA7A59',3890.20,'2024-09-07','2025-01-13 17:42:48'),(139,'RVA7A59',3317.99,'2024-04-17','2025-01-13 17:43:43'),(140,'RVA7A59',1997.84,'2024-04-19','2025-01-13 17:44:23'),(141,'PLU0C63',1380.00,'2024-04-21','2025-01-13 17:44:44'),(142,'PLU0C63',2672.19,'2024-05-24','2025-01-13 17:56:47'),(143,'PLU0C63',3340.68,'2024-05-27','2025-01-13 17:57:11'),(144,'PLU0C63',3984.61,'2024-05-17','2025-01-13 17:57:31'),(145,'PLU0C63',1094.97,'2024-05-02','2025-01-13 17:58:04'),(146,'PLU0C63',2521.28,'2024-05-03','2025-01-13 18:01:17'),(147,'PLU0C63',2297.81,'2024-05-07','2025-01-13 18:01:41'),(148,'PLU0C63',2782.89,'2024-05-14','2025-01-13 18:03:55'),(149,'PLU0C63',1679.38,'2024-05-09','2025-01-13 18:04:31'),(150,'PLU0C63',3756.84,'2024-06-18','2025-01-13 18:04:53'),(151,'PLU0C63',2756.71,'2024-06-27','2025-01-13 18:05:20'),(152,'PLU0C63',1667.83,'2024-06-21','2025-01-13 18:05:40'),(153,'PLU0C63',3183.34,'2024-06-13','2025-01-13 18:06:00'),(154,'PLU0C63',3271.09,'2024-06-02','2025-01-13 18:06:40'),(155,'PLU0C63',2219.02,'2024-06-01','2025-01-13 18:07:02'),(156,'PLU0C63',2432.66,'2024-06-08','2025-01-13 18:07:19'),(157,'PLU0C63',2360.19,'2024-06-10','2025-01-13 18:08:10'),(158,'PLU0C63',4161.36,'2024-07-18','2025-01-13 18:12:46'),(159,'PLU0C63',3737.18,'2024-07-20','2025-01-13 18:13:04'),(160,'PLU0C63',1918.27,'2024-07-15','2025-01-13 18:13:22'),(161,'PLU0C63',4008.70,'2024-07-03','2025-01-13 18:13:44'),(162,'PLU0C63',4957.40,'2024-07-07','2025-01-13 18:14:11'),(163,'PLU0C63',3817.43,'2024-07-11','2025-01-13 18:14:28'),(164,'PLU0C63',2275.00,'2024-07-01','2025-01-13 18:14:52'),(165,'RVA7A59',1507.40,'2024-06-03','2025-01-13 18:29:22'),(166,'RVA7A59',4419.11,'2024-07-10','2025-01-13 18:29:59'),(167,'RVA7A59',3884.01,'2024-07-17','2025-01-13 18:30:20'),(168,'RVA7A59',4979.83,'2024-07-03','2025-01-13 18:30:42'),(169,'RVA7A59',3363.80,'2024-07-16','2025-01-13 18:31:07'),(170,'RVA7A59',2069.00,'2024-07-01','2025-01-13 18:31:36'),(171,'RVA7A59',2576.95,'2024-07-06','2025-01-13 18:31:57'),(172,'RVA7A59',3600.96,'2024-06-09','2025-01-13 18:32:17'),(173,'RVA7A59',1366.53,'2024-06-24','2025-01-13 18:32:56'),(174,'RVA7A59',4208.00,'2024-06-19','2025-01-13 18:33:34'),(175,'RVA7A59',2642.00,'2024-06-17','2025-01-13 18:33:56'),(176,'RVA7A59',2443.00,'2024-06-13','2025-01-13 18:35:45'),(177,'RVA7A59',3838.32,'2024-06-25','2025-01-13 18:36:07'),(178,'RVA7A59',1246.00,'2024-06-11','2025-01-13 18:37:05'),(179,'RVA7A59',1490.80,'2024-05-02','2025-01-13 18:37:27'),(180,'RVA7A59',1352.83,'2024-05-01','2025-01-13 18:37:49'),(181,'RVA7A59',2692.87,'2024-05-23','2025-01-13 18:38:14'),(182,'RVA7A59',1990.79,'2024-05-27','2025-01-13 18:38:30'),(183,'RVA7A59',3951.60,'2024-05-29','2025-01-13 18:39:17'),(184,'RVA7A59',1999.29,'2024-05-06','2025-01-13 18:39:39'),(185,'RVA7A59',3734.00,'2024-05-07','2025-01-13 18:39:54'),(186,'RVA7A59',1681.53,'2024-05-21','2025-01-13 18:40:15'),(187,'RVA7A59',5023.32,'2024-05-15','2025-01-13 18:40:39'),(188,'RVA7A59',753.96,'2024-05-13','2025-01-13 18:40:58'),(189,'RVA7A59',2403.00,'2024-07-26','2025-01-13 18:41:50'),(190,'RVA7A59',2671.00,'2024-07-20','2025-01-13 18:42:38'),(191,'RVA7A59',4901.09,'2024-07-22','2025-01-13 18:43:02'),(192,'RVA7A59',4553.31,'2024-07-27','2025-01-13 18:43:40'),(193,'RVA7A59',5668.13,'2024-08-05','2025-01-13 18:43:59'),(194,'RVA7A59',4035.15,'2024-08-01','2025-01-13 18:44:15'),(196,'PLU0C63',2653.92,'2025-01-10','2025-02-05 16:43:25'),(197,'PLU0C63',2941.90,'2025-01-07','2025-02-05 16:44:17'),(198,'PLU0C63',4182.15,'2025-01-18','2025-02-05 16:44:46'),(199,'PLU0C63',4806.50,'2025-01-24','2025-02-05 16:45:25'),(200,'RVA7A59',9553.57,'2025-02-07','2025-02-10 12:42:03'),(201,'RVA7A59',1217.70,'2025-01-23','2025-02-10 13:06:30'),(202,'RVA7A59',2572.47,'2025-01-17','2025-02-10 13:20:28'),(203,'RVP3103',9601.28,'2025-02-07','2025-02-10 17:14:33'),(204,'RVP3103',6529.00,'2025-01-23','2025-02-10 17:20:53'),(205,'RVP3103',100.00,'2025-01-14','2025-02-10 17:39:20');
/*!40000 ALTER TABLE `viagens` 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 2025-02-17 10:07:44
