/*
SQLyog Professional v12.09 (64 bit)
MySQL - 10.4.22-MariaDB : Database - etp_scanner
*********************************************************************
*/




CREATE DATABASE /*!32312 IF NOT EXISTS*/`etp_scanner` /*!40100 DEFAULT CHARACTER SET utf8mb4 */;

USE `etp_scanner`;

/*Table structure for table `logs` */


CREATE TABLE `logs` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uid` int(11) DEFAULT NULL,
  `message` longtext DEFAULT NULL,
  `body` longtext DEFAULT NULL,
  `response` longtext DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb4;

/*Data for the table `logs` */

insert  into `logs`(`id`,`uid`,`message`,`body`,`response`,`created_at`) values (10,11,'New store is created.','{\"code\":\"1203\",\"description\":\"TRINOMA\",\"folder_id\":\"FTC Trinoma\",\"is_deleted\":0,\"created_at\":\"2024-09-02 15:17:36\"}','8','2024-09-02 15:17:36'),(11,11,'Store id:8 was Updated.','{\"code\":\"1203\",\"description\":\"TRINOMA\",\"folder_id\":\"1S-2XhWLV8dTHRG9LumwgyYxeEeROf7LD\",\"updated_at\":\"2024-09-02 15:17:55\"}','1','2024-09-02 15:17:56'),(12,11,'New scanner is created.','{\"label\":\"SSI-MOBILE\",\"code\":\"1000\",\"is_linked\":0,\"created_at\":\"2024-09-02 15:18:25\"}','19','2024-09-02 15:18:25'),(13,21,'PO Receiving data was successfully uploaded.','[{\"ref\":\"sto-issuance\",\"key\":\"wMZIF6S\",\"id\":359,\"total_qty\":9}]','true','2024-09-02 15:25:57'),(14,21,'PO Receiving data was successfully uploaded.','[{\"ref\":\"sto-issuance\",\"key\":\"SqV9Bqs\",\"id\":368,\"total_qty\":8}]','true','2024-09-02 15:26:48'),(15,21,'STO Issuance failed to generate.','{\"status\":400,\"message\":\"No SAP Article found for the UPC in the system.\"}','\"No SAP Article found for the UPC in the system.\"','2024-09-02 15:27:18'),(16,21,'PO Receiving data was successfully uploaded.','[{\"ref\":\"sto-issuance\",\"key\":\"UA9QETG\",\"id\":376,\"total_qty\":5}]','true','2024-09-02 15:27:31'),(17,21,'STO Issuance failed to generate.','{\"status\":400,\"message\":\"No SAP Article found for the UPC in the system.\"}','\"No SAP Article found for the UPC in the system.\"','2024-09-02 15:29:17'),(18,21,'PO Receiving data was successfully uploaded.','[{\"ref\":\"sto-issuance\",\"key\":\"ldE2w4Z\",\"id\":382,\"total_qty\":14}]','true','2024-09-02 15:31:42');

/*Table structure for table `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=25 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Data for the table `migrations` */

insert  into `migrations`(`id`,`migration`,`batch`) values (4,'2019_12_14_000001_create_personal_access_tokens_table',1),(6,'2024_07_16_070139_add_id_number_to_users_table',2),(8,'2024_07_16_071052_create_roles_table',3),(9,'2024_07_19_031031_create_stores_table',4),(12,'2024_07_24_083050_add_is_deleted_column',5),(13,'2024_07_24_103109_add_store_code_column',6),(15,'2024_07_24_160121_create_scanft_table',7),(16,'2024_07_25_065500_add_ref_column',8),(18,'2024_07_31_122534_create_zones_table',9),(20,'2024_07_31_124947_create_stocktakes_table',10),(21,'2024_08_07_025930_create_scanners_table',11),(24,'2014_10_12_000000_create_users_table',12);

/*Data for the table `personal_access_tokens` */

/*Table structure for table `roles` */


CREATE TABLE `roles` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `description` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Data for the table `roles` */

insert  into `roles`(`id`,`description`,`created_at`,`updated_at`) values (1,'Admin',NULL,NULL),(2,'Store Operations',NULL,NULL),(3,'ICG',NULL,NULL);

/*Table structure for table `scanners` */


CREATE TABLE `scanners` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `label` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `code` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `is_linked` tinyint(1) NOT NULL DEFAULT 0,
  `is_deleted` tinyint(1) DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Data for the table `scanners` */

insert  into `scanners`(`id`,`label`,`code`,`is_linked`,`is_deleted`,`created_at`,`updated_at`) values (4,'Computer','SSIPC',0,0,NULL,'2024-09-02 08:52:51'),(19,'SSI-MOBILE','1000',1,0,'2024-09-02 15:18:25',NULL);

/*Table structure for table `stocktakes` */


CREATE TABLE `stocktakes` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `stocktake_ref` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `warehouse` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `stockzone` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `scanner_code` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `stocktaking_uid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Data for the table `stocktakes` */

/*Table structure for table `stores` */


CREATE TABLE `stores` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `code` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `folder_id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `is_deleted` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Data for the table `stores` */

insert  into `stores`(`id`,`code`,`description`,`folder_id`,`created_at`,`updated_at`,`is_deleted`) values (1,'1201','FTC Glorietta','135l1UrJ51ghZGw2GP2fIzSAeX7Ojwszv','2024-07-24 14:01:17','2024-08-30 06:59:51','0'),(2,'1202','FTC Eastwood','1wMBE8BnzcG0TLiNP0OxwAOxOBdTMZd7x','2024-07-24 08:38:34',NULL,'0'),(8,'1203','TRINOMA','1S-2XhWLV8dTHRG9LumwgyYxeEeROf7LD','2024-09-02 15:17:36','2024-09-02 15:17:55','0');

/*Table structure for table `zones` */


CREATE TABLE `zones` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `description` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `is_deleted` tinyint(1) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Data for the table `zones` */

insert  into `zones`(`id`,`description`,`is_deleted`,`created_at`,`updated_at`) values (1,'Selling Area',0,'2024-07-31 12:38:05',NULL),(2,'Reservation Area',0,'2024-07-31 12:38:13','2024-07-31 12:42:41'),(3,'Damage Area',0,'2024-08-02 07:32:48',NULL),(4,'Warehouse',0,'2024-08-19 06:52:07',NULL);

