Initial commit
Initial commit til Git. V2 er deployed
This commit is contained in:
128
PointOfSale/Utilities/SQL/Structure_Simply_Data_v1.sql
Normal file
128
PointOfSale/Utilities/SQL/Structure_Simply_Data_v1.sql
Normal file
@@ -0,0 +1,128 @@
|
||||
-- --------------------------------------------------------
|
||||
-- Host: mysql22.unoeuro.com
|
||||
-- Server version: 5.7.42-46-log - Percona Server (GPL), Release 46, Revision e1995a8bb71
|
||||
-- Server OS: Linux
|
||||
-- HeidiSQL Version: 12.3.0.6589
|
||||
-- --------------------------------------------------------
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET NAMES utf8 */;
|
||||
/*!50503 SET NAMES utf8mb4 */;
|
||||
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
||||
/*!40103 SET TIME_ZONE='+00:00' */;
|
||||
/*!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 */;
|
||||
|
||||
-- Dumping structure for table blomstertilalt_dk_db.employee
|
||||
DROP TABLE IF EXISTS `employee`;
|
||||
CREATE TABLE IF NOT EXISTS `employee` (
|
||||
`Id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`Name` varchar(50) NOT NULL,
|
||||
`IsArchived` tinyint(4) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`Id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
-- Dumping data for table blomstertilalt_dk_db.employee: ~4 rows (approximately)
|
||||
DELETE FROM `employee`;
|
||||
INSERT INTO `employee` (`Id`, `Name`, `IsArchived`) VALUES
|
||||
(1, 'Jette', 0),
|
||||
(2, 'Lone', 0),
|
||||
(3, 'Emilie', 0),
|
||||
(4, 'Ny', 1);
|
||||
|
||||
-- Dumping structure for table blomstertilalt_dk_db.payment
|
||||
DROP TABLE IF EXISTS `payment`;
|
||||
CREATE TABLE IF NOT EXISTS `payment` (
|
||||
`Id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`SaleId` int(11) NOT NULL DEFAULT '0',
|
||||
`Amount` decimal(20,6) NOT NULL DEFAULT '0.000000',
|
||||
`Type` tinytext COLLATE armscii8_bin NOT NULL,
|
||||
PRIMARY KEY (`Id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=armscii8 COLLATE=armscii8_bin;
|
||||
|
||||
-- Dumping data for table blomstertilalt_dk_db.payment: ~3 rows (approximately)
|
||||
DELETE FROM `payment`;
|
||||
INSERT INTO `payment` (`Id`, `SaleId`, `Amount`, `Type`) VALUES
|
||||
(1, 1, 150.000000, 'Kontant'),
|
||||
(2, 1, 50.000000, 'Kort'),
|
||||
(3, 2, 200.000000, 'Kontant');
|
||||
|
||||
-- Dumping structure for table blomstertilalt_dk_db.product
|
||||
DROP TABLE IF EXISTS `product`;
|
||||
CREATE TABLE IF NOT EXISTS `product` (
|
||||
`Id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`Name` tinytext NOT NULL,
|
||||
`Price` decimal(10,2) NOT NULL,
|
||||
`Description` mediumtext,
|
||||
`ProductGroupId` int(11) NOT NULL DEFAULT '0',
|
||||
`IsArchived` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`Index` int(11) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`Id`),
|
||||
KEY `FK_Product_Categories` (`ProductGroupId`),
|
||||
CONSTRAINT `FK_Product_ProductGroup` FOREIGN KEY (`Id`) REFERENCES `productgroup` (`Id`) ON DELETE NO ACTION ON UPDATE NO ACTION
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
-- Dumping data for table blomstertilalt_dk_db.product: ~0 rows (approximately)
|
||||
DELETE FROM `product`;
|
||||
|
||||
-- Dumping structure for table blomstertilalt_dk_db.productgroup
|
||||
DROP TABLE IF EXISTS `productgroup`;
|
||||
CREATE TABLE IF NOT EXISTS `productgroup` (
|
||||
`Id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`Name` tinytext NOT NULL,
|
||||
`IsArchived` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`Index` int(11) NOT NULL,
|
||||
PRIMARY KEY (`Id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
-- Dumping data for table blomstertilalt_dk_db.productgroup: ~4 rows (approximately)
|
||||
DELETE FROM `productgroup`;
|
||||
INSERT INTO `productgroup` (`Id`, `Name`, `IsArchived`, `Index`) VALUES
|
||||
(1, 'Buketter 1', 1, 0),
|
||||
(2, '3D Print', 0, 0),
|
||||
(3, 'Buket', 0, 1),
|
||||
(4, 'Begravelse', 0, 2),
|
||||
(5, 'Sammenplantning', 0, 3),
|
||||
(6, 'Planter', 0, 4),
|
||||
(7, 'Gravpynt', 1, 5),
|
||||
(8, 'Jul', 0, 5);
|
||||
|
||||
-- Dumping structure for table blomstertilalt_dk_db.sale
|
||||
DROP TABLE IF EXISTS `sale`;
|
||||
CREATE TABLE IF NOT EXISTS `sale` (
|
||||
`Id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`Time` datetime NOT NULL,
|
||||
`EmployeeId` int(11) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`Id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=armscii8 COLLATE=armscii8_bin;
|
||||
|
||||
-- Dumping data for table blomstertilalt_dk_db.sale: ~2 rows (approximately)
|
||||
DELETE FROM `sale`;
|
||||
INSERT INTO `sale` (`Id`, `Time`, `EmployeeId`) VALUES
|
||||
(1, '2023-07-08 23:09:12', 1),
|
||||
(2, '2023-07-08 23:09:29', 1);
|
||||
|
||||
-- Dumping structure for table blomstertilalt_dk_db.sale_line
|
||||
DROP TABLE IF EXISTS `sale_line`;
|
||||
CREATE TABLE IF NOT EXISTS `sale_line` (
|
||||
`Id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`SaleId` int(11) NOT NULL DEFAULT '0',
|
||||
`Product` tinytext COLLATE armscii8_bin NOT NULL,
|
||||
`Pieces` smallint(6) NOT NULL DEFAULT '0',
|
||||
`Price` decimal(20,6) NOT NULL DEFAULT '0.000000',
|
||||
`Total` decimal(20,6) NOT NULL DEFAULT '0.000000',
|
||||
PRIMARY KEY (`Id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=armscii8 COLLATE=armscii8_bin;
|
||||
|
||||
-- Dumping data for table blomstertilalt_dk_db.sale_line: ~2 rows (approximately)
|
||||
DELETE FROM `sale_line`;
|
||||
INSERT INTO `sale_line` (`Id`, `SaleId`, `Product`, `Pieces`, `Price`, `Total`) VALUES
|
||||
(1, 1, 'Buket', 2, 75.000000, 150.000000),
|
||||
(2, 2, '3D Print', 5, 30.000000, 150.000000);
|
||||
|
||||
/*!40103 SET TIME_ZONE=IFNULL(@OLD_TIME_ZONE, 'system') */;
|
||||
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=IFNULL(@OLD_FOREIGN_KEY_CHECKS, 1) */;
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
/*!40111 SET SQL_NOTES=IFNULL(@OLD_SQL_NOTES, 1) */;
|
||||
Reference in New Issue
Block a user