Initial commit
Initial commit til Git. V2 er deployed
This commit is contained in:
108
PointOfSale/Utilities/SQL/Structure_v1.sql
Normal file
108
PointOfSale/Utilities/SQL/Structure_v1.sql
Normal file
@@ -0,0 +1,108 @@
|
||||
-- --------------------------------------------------------
|
||||
-- Host: 127.0.0.1
|
||||
-- Server version: 11.0.2-MariaDB - mariadb.org binary distribution
|
||||
-- Server OS: Win64
|
||||
-- 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 database structure for pointofsale
|
||||
DROP DATABASE IF EXISTS `pointofsale`;
|
||||
CREATE DATABASE IF NOT EXISTS `pointofsale` /*!40100 DEFAULT CHARACTER SET armscii8 COLLATE armscii8_bin */;
|
||||
USE `pointofsale`;
|
||||
|
||||
-- Dumping structure for table pointofsale.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,
|
||||
`IsModified` tinyint(4) DEFAULT NULL,
|
||||
PRIMARY KEY (`Id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
|
||||
-- Data exporting was unselected.
|
||||
|
||||
-- Dumping structure for table pointofsale.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 NOT NULL,
|
||||
PRIMARY KEY (`Id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=armscii8 COLLATE=armscii8_bin;
|
||||
|
||||
-- Data exporting was unselected.
|
||||
|
||||
-- Dumping structure for table pointofsale.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 DEFAULT NULL,
|
||||
`ProductGroupId` int(11) NOT NULL DEFAULT 0,
|
||||
`IsArchived` tinyint(4) NOT NULL DEFAULT 0,
|
||||
`Index` int(11) NOT NULL DEFAULT 0,
|
||||
`IsModified` tinyint(4) DEFAULT NULL,
|
||||
PRIMARY KEY (`Id`),
|
||||
KEY `FK_Product_Categories` (`ProductGroupId`) USING BTREE,
|
||||
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 COLLATE=utf8mb4_general_ci;
|
||||
|
||||
-- Data exporting was unselected.
|
||||
|
||||
-- Dumping structure for table pointofsale.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,
|
||||
`IsModified` tinyint(4) DEFAULT NULL,
|
||||
PRIMARY KEY (`Id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
|
||||
-- Data exporting was unselected.
|
||||
|
||||
-- Dumping structure for table pointofsale.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,
|
||||
`IsModified` tinyint(4) DEFAULT NULL,
|
||||
PRIMARY KEY (`Id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=armscii8 COLLATE=armscii8_bin;
|
||||
|
||||
-- Data exporting was unselected.
|
||||
|
||||
-- Dumping structure for table pointofsale.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 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;
|
||||
|
||||
-- Data exporting was unselected.
|
||||
|
||||
/*!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