/*
SQLyog Ultimate v9.20 
MySQL - 5.7.24 : Database - etars
*********************************************************************
*/


/*!40101 SET NAMES utf8 */;

/*!40101 SET SQL_MODE=''*/;

/*!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 */;
CREATE DATABASE /*!32312 IF NOT EXISTS*/`etars` /*!40100 DEFAULT CHARACTER SET latin1 */;

USE `etars`;

/*Table structure for table `estados` */

DROP TABLE IF EXISTS `estados`;

CREATE TABLE `estados` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `nombre_estado` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Data for the table `estados` */

insert  into `estados`(`id`,`nombre_estado`,`created_at`,`updated_at`) values (1,'INICIAL',NULL,NULL),(2,'EN TRAMITE',NULL,NULL),(3,'LLAMADO',NULL,NULL),(4,'FINALIZADO',NULL,NULL);

/*Table structure for table `failed_jobs` */

DROP TABLE IF EXISTS `failed_jobs`;

CREATE TABLE `failed_jobs` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `connection` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `queue` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Data for the table `failed_jobs` */

/*Table structure for table `familias` */

DROP TABLE IF EXISTS `familias`;

CREATE TABLE `familias` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `nombre_padre` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `dni_padre` int(11) DEFAULT '0',
  `telefono_padre` varchar(11) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `ars_padre` char(1) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `legajo_padre` varchar(4) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `cc_padre` varchar(4) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `interno_padre` varchar(4) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `nombre_madre` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `dni_madre` int(11) DEFAULT '0',
  `telefono_madre` varchar(11) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `ars_madre` char(1) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `legajo_madre` varchar(4) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `cc_madre` varchar(4) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `interno_madre` varchar(4) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `nombre_tutor` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `dni_tutor` int(11) DEFAULT '0',
  `telefono_tutor` varchar(11) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=72 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Data for the table `familias` */

/*Table structure for table `migrations` */

DROP TABLE IF EXISTS `migrations`;

CREATE TABLE `migrations` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `batch` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Data for the table `migrations` */

insert  into `migrations`(`id`,`migration`,`batch`) values (4,'2014_10_12_000000_create_users_table',1),(5,'2014_10_12_100000_create_password_resets_table',1),(6,'2019_08_19_000000_create_failed_jobs_table',1),(7,'2020_06_24_235212_create_registros_table',2),(8,'2020_06_24_235427_create_postulantes_table',2),(9,'2020_06_24_235501_create_familias_table',2),(10,'2020_06_24_235623_create_estados_table',2),(11,'2020_06_24_235641_create_reportes_table',2),(12,'2020_06_24_235716_create_personals_table',2),(13,'2020_06_25_235713_create_tipo_personals_table',2);

/*Table structure for table `password_resets` */

DROP TABLE IF EXISTS `password_resets`;

CREATE TABLE `password_resets` (
  `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `token` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  KEY `password_resets_email_index` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Data for the table `password_resets` */

/*Table structure for table `personals` */

DROP TABLE IF EXISTS `personals`;

CREATE TABLE `personals` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `nombre_personal` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `clave_personal` int(11) NOT NULL,
  `reporte_id` int(10) unsigned NOT NULL,
  `tipo_personal_id` int(10) unsigned NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Data for the table `personals` */

/*Table structure for table `postulantes` */

DROP TABLE IF EXISTS `postulantes`;

CREATE TABLE `postulantes` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `dni_p` int(11) DEFAULT NULL,
  `nombre_p` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `user_id` int(10) DEFAULT NULL,
  `clave` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email_p` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `familia_id` int(10) DEFAULT NULL,
  `sexo` char(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `nacionalidad` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `direccion` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `codigo_postal` int(11) DEFAULT NULL,
  `localidad` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `estado_id` int(10) DEFAULT NULL,
  `copia_dni` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `certificado_alumno` text COLLATE utf8mb4_unicode_ci,
  `personal_id` int(10) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `postulantes_dni_p_unique` (`dni_p`)
) ENGINE=InnoDB AUTO_INCREMENT=122 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Data for the table `postulantes` */

/*Table structure for table `registros` */

DROP TABLE IF EXISTS `registros`;

CREATE TABLE `registros` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `valido` char(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `clave` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `registros_email_unique` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Data for the table `registros` */

/*Table structure for table `reportes` */

DROP TABLE IF EXISTS `reportes`;

CREATE TABLE `reportes` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `tipo_reporte` int(11) NOT NULL,
  `descripcion` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `estado_id` int(10) unsigned NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Data for the table `reportes` */

/*Table structure for table `tipo_personals` */

DROP TABLE IF EXISTS `tipo_personals`;

CREATE TABLE `tipo_personals` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `descripcion_tipo` int(11) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Data for the table `tipo_personals` */

/*Table structure for table `users` */

DROP TABLE IF EXISTS `users`;

CREATE TABLE `users` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email_verified_at` timestamp NULL DEFAULT NULL,
  `password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `users_email_unique` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Data for the table `users` */

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
