CREATE DATABASE  IF NOT EXISTS `dbelearning` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `dbelearning`;
--
-- Host: 127.0.0.1    Database: dbelearning
-- ------------------------------------------------------


--
-- Table structure for table `areas`
--

CREATE TABLE `areas` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `areas`
--

INSERT INTO `areas` VALUES (1,'Agente inmobiliario'),(2,'Empresarios / Emprendedores'),(3,'Diseñadores'),(4,'Contadores'),(5,'Programadores'),(6,'Fotógrafos'),(7,'Videógrafos'),(8,'Nutricionistas'),(9,'Farmacias'),(10,'Trainers'),(11,'Dentistas'),(12,'Pymes'),(13,'Escuelas de yoga'),(14,'Community manager'),(15,'Publicicistas'),(16,'Profesores'),(17,'Restaurantes por delivery'),(18,'Clínicas'),(19,'Supermercados'),(20,'Tiendas de ropa'),(21,'E-Commerce'),(22,'Retailers'),(23,'Importadores de productos médicos'),(24,'Empresas agrícolas'),(25,'Asesores comerciales'),(26,'Consultores de negocios'),(27,'Empresas de Eventos');

--
-- Table structure for table `categories`
--

CREATE TABLE `categories` (
  `idCategory` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`idCategory`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `categories`
--

INSERT INTO `categories` VALUES (1,'3D y Animación'),(2,'Data Science'),(3,'Contabilidad'),(4,'Diseñador gráfico'),(5,'Office'),(6,'Marketing digital'),(7,'Idiomas'),(8,'Programación'),(9,'Finanzas'),(10,'Fotografía y Video'),(11,'Logística'),(12,'Negocios'),(13,'Ventas');

--
-- Table structure for table `course_students`
--

CREATE TABLE `course_students` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `idCourse` int(11) DEFAULT NULL,
  `idStudent` int(11) DEFAULT NULL,
  `idPayment` int(11) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `created_by` int(11) DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `course_students`
--

INSERT INTO `course_students` VALUES (3,1,1,3,'2020-04-05 13:06:56',1,'2020-04-05 13:06:57',1),(4,2,1,4,'2020-04-05 16:18:12',1,'2020-04-05 16:18:13',1),(5,3,1,5,'2020-04-05 16:27:30',1,'2020-04-05 16:27:30',1);

--
-- Table structure for table `courses`
--

CREATE TABLE `courses` (
  `idCourse` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(60) DEFAULT NULL,
  `aliasCourse` varchar(200) DEFAULT NULL,
  `subtitle` varchar(120) DEFAULT NULL,
  `description` longtext DEFAULT NULL,
  `idLevel` int(11) DEFAULT NULL,
  `idTeacher` int(11) DEFAULT NULL,
  `idCategory` int(11) DEFAULT NULL,
  `idArea` int(11) DEFAULT NULL,
  `price` double DEFAULT NULL,
  `promotionPrice` double DEFAULT NULL,
  `promotionDate` date DEFAULT NULL,
  `image` text DEFAULT NULL,
  `video` text DEFAULT NULL,
  `status` tinyint(4) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `created_by` int(11) DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `is_active` tinyint(4) DEFAULT NULL,
  PRIMARY KEY (`idCourse`)
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `courses`
--

INSERT INTO `courses` VALUES (1,'Marketing Digital','mark',NULL,'xxxx',1,1,1,NULL,466,NULL,NULL,'teachers/1/courses/1/info/cursomarketing.jpg',NULL,1,NULL,NULL,NULL,NULL,1),(2,'Programacion','dev',NULL,'aaa',3,1,1,NULL,100,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,1),(3,'Hotelería',NULL,NULL,'ccc',1,1,2,NULL,78,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,1),(4,'Turismo',NULL,NULL,'dd',2,1,3,NULL,9,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,1),(5,'Enfermedad',NULL,NULL,'gg',2,1,2,NULL,77,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,1),(24,'Marketing 3',NULL,NULL,'Marketing Detail',1,1,1,NULL,450,NULL,NULL,'teachers/1/courses/25/info/Que?-es-marketing-1-1280x720.png','public/storage/teachers/1/courses/25/info/Snowfall - 29314.mp4',0,'2020-03-25 22:55:51',1,'2020-03-25 23:57:06',1,1),(25,'Videojuegos 1',NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'2020-03-28 21:49:23',1,'2020-03-28 21:49:23',1,1);

--
-- Table structure for table `lessons`
--

CREATE TABLE `lessons` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `idSection` int(11) DEFAULT NULL,
  `title` varchar(200) DEFAULT NULL,
  `video` text DEFAULT NULL,
  `videoName` text DEFAULT NULL,
  `videoTime` double DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `created_by` int(11) DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `lessons`
--

INSERT INTO `lessons` VALUES (1,8,'leccion 1',NULL,NULL,NULL,'2020-04-12 16:05:55',1,'2020-04-12 16:05:55',1);

--
-- Table structure for table `levels`
--

CREATE TABLE `levels` (
  `idLevel` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`idLevel`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `levels`
--

INSERT INTO `levels` VALUES (1,'Principiante'),(2,'Intermedio'),(3,'Avanzado'),(4,'Todos los niveles');

--
-- Table structure for table `migrations`
--

CREATE TABLE `migrations` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `migration` varchar(191) NOT NULL,
  `batch` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `migrations`
--


--
-- Table structure for table `oauth_auth_codes`
--

CREATE TABLE `oauth_auth_codes` (
  `id` varchar(100) NOT NULL,
  `user_id` bigint(20) NOT NULL,
  `client_id` int(10) unsigned NOT NULL,
  `scopes` text DEFAULT NULL,
  `revoked` tinyint(1) NOT NULL,
  `expires_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `oauth_auth_codes`
--


--
-- Table structure for table `oauth_personal_access_clients`
--

CREATE TABLE `oauth_personal_access_clients` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `client_id` int(10) unsigned NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `oauth_personal_access_clients_client_id_index` (`client_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `oauth_personal_access_clients`
--

INSERT INTO `oauth_personal_access_clients` VALUES (2,3,'2020-03-21 23:36:31','2020-03-21 23:36:31');

--
-- Table structure for table `payment_methods`
--

CREATE TABLE `payment_methods` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `payment_methods`
--

INSERT INTO `payment_methods` VALUES (1,'efectivo'),(2,'tarjeta');

--
-- Table structure for table `payment_states`
--

CREATE TABLE `payment_states` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(45) DEFAULT NULL,
  `color` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `payment_states`
--

INSERT INTO `payment_states` VALUES (1,'Pendiente de Pago','yellow'),(2,'Pagado','green');

--
-- Table structure for table `payments`
--

CREATE TABLE `payments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `idPaymentMethod` int(11) DEFAULT NULL,
  `amount` double DEFAULT NULL,
  `idPaymentState` int(11) DEFAULT NULL,
  `idTransaction` varchar(200) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `created_by` int(11) DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `payments`
--

INSERT INTO `payments` VALUES (3,1,466,2,'123123xxxxxx123','2020-04-05 13:06:57',1,'2020-04-05 13:57:25',1),(4,1,100,1,NULL,'2020-04-05 16:18:12',1,'2020-04-05 16:18:12',1),(5,1,78,1,NULL,'2020-04-05 16:27:30',1,'2020-04-05 16:27:30',1);

--
-- Table structure for table `resource_types`
--

CREATE TABLE `resource_types` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(500) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `resource_types`
--

INSERT INTO `resource_types` VALUES (1,'Archivo'),(2,'Link');

--
-- Table structure for table `resources`
--

CREATE TABLE `resources` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `idLesson` int(11) DEFAULT NULL,
  `idResourceType` int(11) DEFAULT NULL,
  `name` varchar(500) DEFAULT NULL,
  `link` text DEFAULT NULL,
  `file` text DEFAULT NULL,
  `fileSize` double DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `resources`
--


--
-- Table structure for table `sections`
--

CREATE TABLE `sections` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `idCourse` int(11) DEFAULT NULL,
  `title` varchar(200) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `created_by` int(11) DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `sections`
--

INSERT INTO `sections` VALUES (8,1,'section3','2020-04-12 15:54:35',1,'2020-04-12 15:54:35',1),(9,1,'seccion 5','2020-04-12 16:15:38',1,'2020-04-12 16:15:38',1);


