-- phpMyAdmin SQL Dump
-- version 4.1.12
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Oct 30, 2014 at 08:08 AM
-- Server version: 5.5.36
-- PHP Version: 5.4.27

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!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 */;

--
-- Database: `api_app_movil`
--

-- --------------------------------------------------------

--
-- Table structure for table `pedidos`
--

CREATE TABLE IF NOT EXISTS `pedidos` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `mac_address` varchar(30) NOT NULL,
  `cod_pedido` int(11) NOT NULL,
  `cod_cliente` varchar(80) NOT NULL,
  `fe_creacion` datetime NOT NULL,
  `fe_actualizado` datetime DEFAULT NULL,
  `estatus` enum('pendiente','procesado') NOT NULL DEFAULT 'pendiente',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;

--
-- Dumping data for table `pedidos`
--

INSERT INTO `pedidos` (`id`, `mac_address`, `cod_pedido`, `cod_cliente`, `fe_creacion`, `fe_actualizado`, `estatus`) VALUES
(1, '24:DB:ED:5E:3B:9F', 21, '3000000', '2014-10-19 00:00:00', '2014-10-20 01:48:11', 'pendiente'),
(2, '08:00:27:66:e6:70', 24, '3022043', '2014-10-19 00:00:00', '2014-10-19 05:21:09', 'pendiente'),
(3, '08:00:27:66:e6:70', 21, '3022043', '2014-10-20 00:00:00', '2014-10-19 10:55:10', 'pendiente');

-- --------------------------------------------------------

--
-- Table structure for table `pedidos_detalles`
--

CREATE TABLE IF NOT EXISTS `pedidos_detalles` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `pedido_id` int(11) NOT NULL,
  `cod_pedido` int(11) NOT NULL,
  `cod_item` varchar(80) NOT NULL,
  `precio` decimal(10,2) NOT NULL,
  `cantidad` int(10) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=51 ;

--
-- Dumping data for table `pedidos_detalles`
--

INSERT INTO `pedidos_detalles` (`id`, `pedido_id`, `cod_pedido`, `cod_item`, `precio`, `cantidad`) VALUES
(4, 0, 21, '33', '6.56', 1),
(5, 0, 21, '298', '56.00', 1),
(6, 0, 21, '450', '22.05', 1),
(37, 2, 24, '23534', '27.00', 1),
(38, 2, 24, '23536', '27.00', 1),
(39, 2, 24, '23539', '27.00', 1),
(48, 3, 21, '1053', '136.28', 24),
(49, 3, 21, '1068', '133.84', 4),
(50, 1, 21, '23534', '27.00', 1);

/*!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 */;
