/*

SQLyog Ultimate v8.6 Beta2
MySQL - 8.0.27 : Database - baseyii2024

*********************************************************************

*/













CREATE DATABASE /*!32312 IF NOT EXISTS*/`baseyii2024` /*!40100 DEFAULT CHARACTER SET utf8 */ /*!80016 DEFAULT ENCRYPTION='N' */;



USE `baseyii2024`;



/*Table structure for table `operacion` */






CREATE TABLE `operacion` (
  `id` int NOT NULL AUTO_INCREMENT,
  `nombre` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3 COLLATE=utf8_unicode_ci;



/*Data for the table `operacion` */



insert  into `operacion`(`id`,`nombre`) values (1,'*');



/*Table structure for table `rol` */






CREATE TABLE `rol` (
  `id` int NOT NULL AUTO_INCREMENT,
  `nombre` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb3 COLLATE=utf8_unicode_ci;



/*Data for the table `rol` */



insert  into `rol`(`id`,`nombre`) values (1,'Super Admin'),(2,'Super Usuario'),(3,'Usuario');



/*Table structure for table `rol_operacion` */






CREATE TABLE `rol_operacion` (
  `rol_id` int NOT NULL,
  `operacion_id` int NOT NULL,
  PRIMARY KEY (`rol_id`,`operacion_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8_unicode_ci;



/*Data for the table `rol_operacion` */



insert  into `rol_operacion`(`rol_id`,`operacion_id`) values (1,1);



/*Table structure for table `user` */






CREATE TABLE `user` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `username` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `auth_key` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `password_hash` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `password_reset_token` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `email` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `status` smallint NOT NULL DEFAULT '10',
  `rol_id` smallint NOT NULL DEFAULT '10',
  `created_at` int NOT NULL,
  `updated_at` int NOT NULL,
  `verification_token` varchar(250) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `username` (`username`),
  UNIQUE KEY `email` (`email`),
  UNIQUE KEY `password_reset_token` (`password_reset_token`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb3 COLLATE=utf8_unicode_ci;



/*Data for the table `user` */



insert  into `user`(`id`,`username`,`auth_key`,`password_hash`,`password_reset_token`,`email`,`status`,`rol_id`,`created_at`,`updated_at`,`verification_token`) values (1,'admin','35PvPl3pxD57PbjqyWWeEMATGVQ68m6k','$2y$13$DwsAGc2Ll8FHTctIn1fe8.dkFcoZOgM5VNLgT1wyWz2C5nBU.6el6',NULL,'admin@admin.com',10,1,1498195852,1498195852,NULL),(2,'ejemplo','Blm2_MStDsug4LmX5Z1cPs63dpGESgH1','$2y$13$J0Nisw.2tTkMfyA3tcHs0uvZNQF9c2EE5IsqFAhWNKmHVqPuEf1FG',NULL,'ejemplo@ejemplo.com',9,10,1725077220,1725077220,'bX0b2K0-cSF5jom8X1SN8OkkxBOjAkMZ_1725077220');







