-- MariaDB dump 10.19  Distrib 10.5.23-MariaDB, for Linux (x86_64)
--
-- Host: localhost    Database: user114
-- ------------------------------------------------------
-- Server version	10.5.23-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 `clients`
--

DROP TABLE IF EXISTS `clients`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `clients` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL,
  `phone` varchar(50) DEFAULT NULL,
  `email` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `clients`
--

LOCK TABLES `clients` WRITE;
/*!40000 ALTER TABLE `clients` DISABLE KEYS */;
INSERT INTO `clients` VALUES (1,'ИП \"Олимпийский Резерв\"','+74951001010','olimp@school.ru'),(2,'Петров И.Н.','+375293334455','petrov@mail.by'),(3,'Johnson J.D.','+12125551122','johnson@usa.com'),(4,'Swimming Club Berlin','+49302002030','club@berlin.de'),(5,'ООО \"Синяя Вода\"','+78122003040','bluewater@spb.ru'),(6,'Дюран Ф.','+33601010101','duran@france.fr'),(7,'Svensson A.','+4684005060','svensson@se.com'),(8,'Мустафин Р.Т.','+73836667788','mustafin@nsk.ru'),(9,'ФОК \"Акватика\"','+78121112233','aqua@fok.ru'),(10,'Шмидт М.','+494050060070','schmidt@hamburg.de'),(11,'Aethel Ltd','+302107778899','aethel@greece.gr'),(12,'Meyer H.','+41445556677','meyer@zurich.ch'),(13,'Котов В.А.','+33491304050','kotov@marsel.fr'),(14,'ООО \"Фитнес Лайф\"','+375178009000','fitness@brest.by'),(15,'Bianchi G.','+390212345678','bianchi@milan.it'),(16,'Спортшкола №5','+41228889900','sport5@geneva.ch'),(17,'Каримов Т.З.','+77273003030','karimov@shymkent.kz'),(18,'Papadopoulos K.','+302315556677','papa@thess.gr'),(19,'ООО \"Аквамир-Опт\"','+39041999888','aquamir@italy.com'),(20,'Williams S.','+13234445566','williams@la.com'),(21,'TEST','+74951001010','test@gmail.ru'),(24,'TEST','+7821517571','test@gamil.com'),(25,'TEST','+7821517571','test@gamil.com');
/*!40000 ALTER TABLE `clients` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `products`
--

DROP TABLE IF EXISTS `products`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `products` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL,
  `standart_price` decimal(10,2) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `products`
--

LOCK TABLES `products` WRITE;
/*!40000 ALTER TABLE `products` DISABLE KEYS */;
INSERT INTO `products` VALUES (1,'Cobra Racing Goggle',5990.00),(2,'Speedo Fastskin Prime',7990.00),(3,'Aqua Sphere Kayenne',3850.00),(4,'Barracuda Short Fin',3200.00),(5,'Long Blade Fin Pro',5100.00),(6,'Cressi Palau Snorkeling',6500.00),(7,'Silicone Cap Flow',1350.00),(8,'Textile Cap Pro',950.00),(9,'Latex Training Cap',350.00),(10,'Racing One Piece Suit',12500.00),(11,'Beach Style Suit',4100.00),(12,'Jammers Pro',5200.00),(13,'Briefs Classic',1990.00),(14,'Microfiber XL',3100.00),(15,'Cotton Standard',1200.00),(16,'Full Wetsuit 5mm',35000.00),(17,'Shorty 2mm',16000.00),(18,'Pool Slides Comfort',2500.00),(19,'Water Shoes Grip',4100.00),(20,'Kids Aqua Shoes',1500.00),(21,'Shorty classic',1000.00);
/*!40000 ALTER TABLE `products` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `sales`
--

DROP TABLE IF EXISTS `sales`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `sales` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `client_id` int(11) DEFAULT NULL,
  `supplie_id` int(11) DEFAULT NULL,
  `quantity` int(11) DEFAULT NULL,
  `unit_price` decimal(10,2) DEFAULT NULL,
  `total_price` decimal(10,2) DEFAULT NULL,
  `sale_date` date DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `client_id` (`client_id`),
  KEY `supplie_id` (`supplie_id`),
  CONSTRAINT `sales_ibfk_1` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE SET NULL,
  CONSTRAINT `sales_ibfk_2` FOREIGN KEY (`supplie_id`) REFERENCES `supplies` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=41 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `sales`
--

LOCK TABLES `sales` WRITE;
/*!40000 ALTER TABLE `sales` DISABLE KEYS */;
INSERT INTO `sales` VALUES (1,1,1,50,300.00,15000.00,'2010-08-01'),(2,2,2,1,1350.00,1350.00,'2011-05-20'),(3,4,3,5,1800.00,9000.00,'2012-11-01'),(4,8,4,1,3850.00,3850.00,'2013-10-05'),(5,10,5,2,1200.00,2400.00,'2014-04-10'),(6,12,1,100,250.00,25000.00,'2014-12-01'),(7,13,4,1,3850.00,3850.00,'2015-01-20'),(8,15,3,5,1990.00,9950.00,'2015-05-15'),(9,14,6,10,3200.00,32000.00,'2016-10-01'),(10,16,7,5,4100.00,20500.00,'2017-07-05'),(11,17,8,1,3100.00,3100.00,'2018-04-10'),(12,18,9,2,2500.00,5000.00,'2019-12-01'),(13,20,10,1,1500.00,1500.00,'2020-05-15'),(14,5,9,50,2000.00,100000.00,'2020-09-01'),(15,11,11,1,35000.00,35000.00,'2021-09-01'),(16,19,12,5,15000.00,75000.00,'2022-04-10'),(17,1,13,2,12500.00,25000.00,'2023-04-05'),(18,2,14,1,5200.00,5200.00,'2024-01-20'),(19,3,15,1,5100.00,5100.00,'2024-03-05'),(20,4,16,1,6500.00,6500.00,'2024-03-20'),(21,6,17,1,4100.00,4100.00,'2024-04-10'),(22,5,18,20,5500.00,110000.00,'2024-05-01'),(23,9,19,10,7500.00,75000.00,'2024-06-05'),(24,14,20,30,1200.00,36000.00,'2024-07-01'),(25,1,21,5,3100.00,15500.00,'2024-10-01'),(26,16,22,10,1990.00,19900.00,'2025-01-10'),(27,2,23,1,2500.00,2500.00,'2025-05-03'),(28,18,27,2,1500.00,3000.00,'2025-05-03'),(29,14,18,5,5990.00,29950.00,'2025-05-05'),(30,11,22,10,1900.00,19000.00,'2025-05-08'),(31,1,24,2,12500.00,25000.00,'2025-05-10'),(32,9,25,30,3200.00,96000.00,'2025-05-15'),(33,16,26,1,16000.00,16000.00,'2025-05-20'),(34,19,16,20,6000.00,120000.00,'2025-05-25'),(35,10,28,1,5990.00,5990.00,'2025-06-03'),(36,11,29,5,4100.00,20500.00,'2025-06-05'),(37,8,30,1,7990.00,7990.00,'2025-06-08'),(38,13,25,1,3200.00,3200.00,'2025-06-10'),(39,14,11,1,35000.00,35000.00,'2025-06-15'),(40,5,28,20,5700.00,114000.00,'2025-06-25');
/*!40000 ALTER TABLE `sales` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `supplies`
--

DROP TABLE IF EXISTS `supplies`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `supplies` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `product_id` int(11) DEFAULT NULL,
  `production_date` date DEFAULT NULL,
  `supply_date` date DEFAULT NULL,
  `quantity` int(11) NOT NULL,
  `defect_quantity` int(11) DEFAULT NULL,
  `unit_purchase_price` decimal(10,2) DEFAULT NULL,
  `unit_sale_price` decimal(10,2) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `product_id` (`product_id`),
  CONSTRAINT `supplies_ibfk_1` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `supplies`
--

LOCK TABLES `supplies` WRITE;
/*!40000 ALTER TABLE `supplies` DISABLE KEYS */;
INSERT INTO `supplies` VALUES (1,9,'2010-05-01','2010-07-15',500,50,100.00,350.00),(2,7,'2011-03-20','2011-05-10',300,10,500.00,1350.00),(3,13,'2012-08-01','2012-10-01',250,0,900.00,1990.00),(4,3,'2013-06-10','2013-09-01',150,0,1500.00,3850.00),(5,15,'2014-01-01','2014-03-15',400,0,500.00,1200.00),(6,4,'2016-07-20','2016-09-05',200,0,1500.00,3200.00),(7,11,'2017-04-01','2017-06-01',100,5,2000.00,4100.00),(8,14,'2018-01-15','2018-03-01',250,0,1600.00,3100.00),(9,18,'2019-09-01','2019-11-01',400,0,1100.00,2500.00),(10,20,'2020-03-10','2020-05-01',200,0,700.00,1500.00),(11,16,'2021-06-01','2021-08-10',15,0,18000.00,35000.00),(12,17,'2022-01-15','2022-03-05',30,0,9000.00,16000.00),(13,10,'2023-02-01','2023-03-10',40,0,6500.00,12500.00),(14,12,'2023-11-20','2024-01-10',100,0,2700.00,5200.00),(15,5,'2024-01-01','2024-03-01',50,0,2800.00,5100.00),(16,6,'2024-01-05','2024-02-28',70,0,3500.00,6500.00),(17,19,'2024-02-01','2024-03-05',150,0,1800.00,4100.00),(18,1,'2024-03-01','2024-04-15',150,3,3000.00,5990.00),(19,2,'2024-04-01','2024-05-05',80,0,4500.00,7990.00),(20,7,'2024-05-10','2024-06-15',400,20,620.00,1350.00),(21,14,'2024-07-15','2024-09-28',100,0,1650.00,3100.00),(22,13,'2024-10-15','2024-12-20',200,0,950.00,1990.00),(23,18,'2025-01-20','2025-02-20',300,0,1150.00,2500.00),(24,10,'2025-02-20','2025-03-25',60,0,6800.00,12500.00),(25,4,'2025-02-25','2025-04-05',100,0,1450.00,3200.00),(26,17,'2025-02-01','2025-03-15',20,0,8500.00,16000.00),(27,20,'2025-03-01','2025-04-10',150,0,750.00,1500.00),(28,1,'2025-03-10','2025-04-15',200,10,3200.00,5990.00),(29,11,'2025-01-01','2025-02-01',50,2,2100.00,4100.00),(30,2,'2025-03-15','2025-04-20',100,0,4700.00,7990.00);
/*!40000 ALTER TABLE `supplies` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `total_units`
--

DROP TABLE IF EXISTS `total_units`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `total_units` (
  `sum` bigint(20) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `total_units`
--

LOCK TABLES `total_units` WRITE;
/*!40000 ALTER TABLE `total_units` DISABLE KEYS */;
INSERT INTO `total_units` VALUES (5115);
/*!40000 ALTER TABLE `total_units` 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 2026-02-20 11:38:28
