text: -- MySQL dump 10.13  Distrib 5.6.30, for Win64 (x86_64)
  --
  -- Host: localhost    Database: erp_catalog
  -- ------------------------------------------------------
  -- Server version	5.6.30-log
  
  /*!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 utf8 */;
  /*!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 */;
  
  --
  -- Current Database: `erp_catalog`
  --
  
  CREATE DATABASE /*!32312 IF NOT EXISTS*/ `erp_catalog` /*!40100 DEFAULT CHARACTER SET utf8 */;
  
  USE `erp_catalog`;
  
  --
  -- Table structure for table `catalog`
  --
  
  DROP TABLE IF EXISTS `catalog`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `catalog` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `name` varchar(45) NOT NULL DEFAULT '',
    `tid` int(11) NOT NULL,
    `uomId` int(11) NOT NULL,
    `cost_price` double(10,2) NOT NULL DEFAULT '0.00',
    `wholesale_price` double(10,2) DEFAULT NULL,
    `retail_price` double(10,2) DEFAULT NULL,
    `description` longtext,
    `tags` varchar(45) DEFAULT NULL,
    `stock` int(11) NOT NULL,
    `supplierId` int(11) NOT NULL,
    PRIMARY KEY (`id`),
    KEY `fk_catalog_uom_idx` (`uomId`),
    KEY `fk_catalog_material_type1_idx` (`tid`),
    CONSTRAINT `fk_catalog_material_type1` FOREIGN KEY (`tid`) REFERENCES `material_type` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
    CONSTRAINT `fk_catalog_uom` FOREIGN KEY (`uomId`) REFERENCES `uom` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
  ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Dumping data for table `catalog`
  --
  
  LOCK TABLES `catalog` WRITE;
  /*!40000 ALTER TABLE `catalog` DISABLE KEYS */;
  INSERT INTO `catalog` VALUES (1,'broom',1,1,343.00,343.00,343.00,'fgfg','fgfgh',3,1),(2,'hellorkie',1,1,54.60,5.60,56.50,'trtytr','tret',10,1),(3,'hello',1,1,454.70,54.50,656.60,'sfdfd','sfgsf',4,1),(4,'hello',1,1,454.70,54.50,656.60,'sfdfd','sfgsf',4,1),(5,'hello',1,1,454.70,54.50,656.60,'sfdfd','sfgsf',4,1),(6,'hello',1,1,454.70,54.50,656.60,'sfdfd','sfgsf',4,1);
  /*!40000 ALTER TABLE `catalog` ENABLE KEYS */;
  UNLOCK TABLES;
  
  --
  -- Table structure for table `material_type`
  --
  
  DROP TABLE IF EXISTS `material_type`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `material_type` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `name` varchar(45) NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Dumping data for table `material_type`
  --
  
  LOCK TABLES `material_type` WRITE;
  /*!40000 ALTER TABLE `material_type` DISABLE KEYS */;
  INSERT INTO `material_type` VALUES (1,'paper');
  /*!40000 ALTER TABLE `material_type` ENABLE KEYS */;
  UNLOCK TABLES;
  
  --
  -- Table structure for table `uom`
  --
  
  DROP TABLE IF EXISTS `uom`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `uom` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `unit` varchar(45) NOT NULL DEFAULT '',
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Dumping data for table `uom`
  --
  
  LOCK TABLES `uom` WRITE;
  /*!40000 ALTER TABLE `uom` DISABLE KEYS */;
  INSERT INTO `uom` VALUES (1,'ft'),(10,'meters');
  /*!40000 ALTER TABLE `uom` 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 2016-04-19 23:25:28
  