-- MySQL dump 10.13  Distrib 5.1.37, for debian-linux-gnu (i486)
--
-- Host: localhost    Database: tv
-- ------------------------------------------------------
-- Server version	5.1.37-1ubuntu5-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 */;

--
-- Table structure for table `rcompraproduto`
--

DROP TABLE IF EXISTS `rcompraproduto`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `rcompraproduto` (
  `codcom` bigint(20) NOT NULL DEFAULT '0',
  `codpro` bigint(20) NOT NULL DEFAULT '0',
  `quapro` double NOT NULL DEFAULT '0',
  `totpro` double DEFAULT NULL,
  `qu2pro` double DEFAULT NULL,
  PRIMARY KEY (`codcom`,`codpro`),
  KEY `codpro` (`codpro`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `rpedidoproduto`
--

DROP TABLE IF EXISTS `rpedidoproduto`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `rpedidoproduto` (
  `codpep` bigint(20) NOT NULL AUTO_INCREMENT,
  `codped` bigint(20) NOT NULL DEFAULT '0',
  `codpro` bigint(20) NOT NULL DEFAULT '0',
  `quapro` double NOT NULL DEFAULT '0',
  `totpro` double NOT NULL DEFAULT '0',
  `entpro` double DEFAULT NULL,
  `to2pro` double NOT NULL DEFAULT '0',
  PRIMARY KEY (`codpep`),
  KEY `codped` (`codped`,`codpro`),
  KEY `codpro` (`codpro`)
) ENGINE=MyISAM AUTO_INCREMENT=4376 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `tadmin`
--

DROP TABLE IF EXISTS `tadmin`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tadmin` (
  `codadm` smallint(6) NOT NULL DEFAULT '0',
  `ca1adm` double NOT NULL DEFAULT '0',
  `ca2adm` double NOT NULL DEFAULT '0',
  PRIMARY KEY (`codadm`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `tcompra`
--

DROP TABLE IF EXISTS `tcompra`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tcompra` (
  `codcom` bigint(20) NOT NULL AUTO_INCREMENT,
  `codusu` bigint(20) NOT NULL DEFAULT '0',
  `datcom` date DEFAULT NULL,
  `efecom` tinyint(1) DEFAULT '0',
  `totcom` double DEFAULT NULL,
  `to2com` double DEFAULT NULL,
  `pagcom` double DEFAULT NULL,
  `dtpcom` date DEFAULT NULL,
  `codus2` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`codcom`),
  KEY `codusu` (`codusu`),
  KEY `codus2` (`codus2`)
) ENGINE=MyISAM AUTO_INCREMENT=1378 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `tfornecedor`
--

DROP TABLE IF EXISTS `tfornecedor`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tfornecedor` (
  `codfor` bigint(20) NOT NULL AUTO_INCREMENT,
  `nomfor` varchar(100) NOT NULL DEFAULT '',
  `endfor` varchar(255) DEFAULT NULL,
  `cidfor` varchar(100) DEFAULT NULL,
  `baifor` varchar(100) DEFAULT NULL,
  `estfor` char(2) DEFAULT NULL,
  `telfor` varchar(20) DEFAULT NULL,
  `emafor` varchar(100) DEFAULT NULL,
  `celfor` varchar(20) DEFAULT NULL,
  `inffor` text,
  `atifor` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`codfor`)
) ENGINE=MyISAM AUTO_INCREMENT=20 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `tmovimentacao`
--

DROP TABLE IF EXISTS `tmovimentacao`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tmovimentacao` (
  `codmov` bigint(20) NOT NULL AUTO_INCREMENT,
  `tipmov` smallint(6) NOT NULL DEFAULT '0',
  `caxmov` smallint(6) NOT NULL DEFAULT '0',
  `valmov` double NOT NULL DEFAULT '0',
  `desmov` varchar(255) NOT NULL DEFAULT '',
  `datmov` date NOT NULL DEFAULT '0000-00-00',
  PRIMARY KEY (`codmov`)
) ENGINE=MyISAM AUTO_INCREMENT=2172 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `tpedido`
--

DROP TABLE IF EXISTS `tpedido`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tpedido` (
  `codped` bigint(20) NOT NULL AUTO_INCREMENT,
  `codfor` bigint(20) NOT NULL DEFAULT '0',
  `datped` date NOT NULL DEFAULT '0000-00-00',
  `finped` tinyint(1) NOT NULL DEFAULT '0',
  `valped` double NOT NULL DEFAULT '0',
  `va2ped` double DEFAULT NULL,
  `pagped` double DEFAULT NULL,
  `dtpped` date DEFAULT NULL,
  `codusu` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`codped`),
  KEY `codfor` (`codfor`),
  KEY `codusu` (`codusu`)
) ENGINE=MyISAM AUTO_INCREMENT=292 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `tproduto`
--

DROP TABLE IF EXISTS `tproduto`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tproduto` (
  `codpro` bigint(20) NOT NULL AUTO_INCREMENT,
  `codfor` bigint(20) NOT NULL DEFAULT '0',
  `codtip` bigint(20) DEFAULT NULL,
  `nompro` varchar(50) DEFAULT NULL,
  `despro` varchar(255) DEFAULT NULL,
  `imgpro` varchar(100) DEFAULT NULL,
  `unipro` char(2) DEFAULT NULL,
  `prepro` double DEFAULT NULL,
  `atipro` tinyint(1) DEFAULT '1',
  `parpro` tinyint(1) DEFAULT '1',
  `oripro` varchar(50) DEFAULT NULL,
  `bompro` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`codpro`),
  KEY `codfor` (`codfor`),
  KEY `codtip` (`codtip`)
) ENGINE=MyISAM AUTO_INCREMENT=704 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ttabela`
--

DROP TABLE IF EXISTS `ttabela`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ttabela` (
  `codtab` bigint(20) NOT NULL AUTO_INCREMENT,
  `dattab` date NOT NULL DEFAULT '0000-00-00',
  `codus1` bigint(20) DEFAULT NULL,
  `codus2` bigint(20) DEFAULT NULL,
  `codus3` bigint(20) DEFAULT NULL,
  `codus4` bigint(20) DEFAULT NULL,
  `codus5` bigint(20) DEFAULT NULL,
  `codus6` bigint(20) DEFAULT NULL,
  `codus7` bigint(20) DEFAULT NULL,
  `codus8` bigint(20) DEFAULT NULL,
  `codus9` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`codtab`)
) ENGINE=MyISAM AUTO_INCREMENT=98 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ttipoproduto`
--

DROP TABLE IF EXISTS `ttipoproduto`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ttipoproduto` (
  `codtip` bigint(20) NOT NULL AUTO_INCREMENT,
  `nomtip` varchar(100) NOT NULL DEFAULT '',
  PRIMARY KEY (`codtip`)
) ENGINE=MyISAM AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `tusuario`
--

DROP TABLE IF EXISTS `tusuario`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tusuario` (
  `codusu` bigint(20) NOT NULL AUTO_INCREMENT,
  `nomusu` varchar(100) NOT NULL DEFAULT '',
  `logusu` varchar(10) NOT NULL DEFAULT '',
  `senusu` varchar(50) NOT NULL DEFAULT '',
  `emausu` varchar(100) NOT NULL DEFAULT '',
  `tipusu` smallint(6) NOT NULL DEFAULT '0',
  `telusu` varchar(20) NOT NULL DEFAULT '',
  `celusu` varchar(20) NOT NULL DEFAULT '',
  `lisusu` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`codusu`),
  UNIQUE KEY `logusu` (`logusu`)
) ENGINE=MyISAM AUTO_INCREMENT=607 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!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 2009-11-11 10:59:36
