-- https://www.phpmyadmin.net/
--

START TRANSACTION;



--
-- Database: `passtik`
--

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

--
-- Table structure for table `activitys`
--

CREATE TABLE `activitys` (
  `id` int(10) UNSIGNED NOT NULL,
  `chronogram_id` int(10) UNSIGNED NOT NULL,
  `label` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `beginning_hour` time NOT NULL,
  `end_hour` time NOT NULL,
  `description` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `room` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `create_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `update_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `buytickets`
--

CREATE TABLE `buytickets` (
  `id` int(10) UNSIGNED NOT NULL,
  `quantity` int(10) UNSIGNED NOT NULL,
  `ticket_id` int(10) UNSIGNED NOT NULL,
  `client_id` int(10) UNSIGNED NOT NULL,
  `uuid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `state` enum('new','in used','') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  `payment_status` enum('created','pending','completed','expired','failed') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'created',
  `create_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `update_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `candidates`
--

CREATE TABLE `candidates` (
  `id` int(10) UNSIGNED NOT NULL,
  `vote_id` int(10) UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `identity` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `num_candidat` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `nbr_vote` int(11) NOT NULL DEFAULT 0,
  `photo` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `link` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `create_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `update_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `candidate_votes`
--

CREATE TABLE `candidate_votes` (
  `id` int(10) UNSIGNED NOT NULL,
  `quantity` int(10) UNSIGNED NOT NULL,
  `candidate_id` int(10) UNSIGNED NOT NULL,
  `client_id` int(10) UNSIGNED NOT NULL,
  `create_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `update_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `chronograms`
--

CREATE TABLE `chronograms` (
  `id` int(10) UNSIGNED NOT NULL,
  `event_id` int(10) UNSIGNED NOT NULL,
  `date` date NOT NULL,
  `create_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `update_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `clients`
--

CREATE TABLE `clients` (
  `id` int(10) UNSIGNED NOT NULL,
  `username` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `phone_number` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `visitor_identifier` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `create_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `update_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `communitys`
--

CREATE TABLE `communitys` (
  `id` int(10) UNSIGNED NOT NULL,
  `owner` int(10) UNSIGNED NOT NULL,
  `guest` int(10) UNSIGNED NOT NULL,
  `event_id` int(10) UNSIGNED NOT NULL,
  `create_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `update_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `config_places`
--

CREATE TABLE `config_places` (
  `id` int(10) UNSIGNED NOT NULL,
  `event_id` int(10) UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `place_number` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `numbering` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `create_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `update_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `events`
--

CREATE TABLE `events` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `country` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `place` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `date_since` date NOT NULL,
  `date_end` date NOT NULL,
  `time_end` time NOT NULL,
  `user_id` int(10) UNSIGNED NOT NULL,
  `event_type_id` int(10) UNSIGNED NOT NULL,
  `status` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `published` tinyint(1) NOT NULL DEFAULT 0,
  `private` tinyint(1) NOT NULL DEFAULT 0,
  `verify` tinyint(1) NOT NULL DEFAULT 0,
  `link` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `banner` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `photo` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `create_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `update_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `event_types`
--

CREATE TABLE `event_types` (
  `id` int(10) UNSIGNED NOT NULL,
  `label` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `create_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `update_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `event_types`
--

INSERT INTO `event_types` (`id`, `label`, `create_at`, `update_at`) VALUES
(1, 'Événement', '2022-06-13 21:47:21', '2022-06-13 21:47:21'),
(2, 'Transport', '2022-06-13 21:47:21', '2022-06-13 21:47:21'),
(3, 'Conférences et formations', '2022-06-13 21:47:21', '2022-06-13 21:47:21'),
(4, 'Sport', '2022-06-13 21:47:21', '2022-06-13 21:47:21');

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

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

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

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

INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(1, '2019_12_14_000001_create_personal_access_tokens_table', 1),
(2, '2022_01_12_164856_create_user_types_table', 1),
(3, '2022_01_12_165725_create_users_table', 1),
(4, '2022_01_13_215903_create_event_types_table', 1),
(5, '2022_01_14_085618_create_events_table', 1),
(6, '2022_01_15_115255_create_user_verifys_table', 1),
(7, '2022_01_28_001030_create_social_links_table', 1),
(8, '2022_01_29_143543_create_chronograms_table', 1),
(9, '2022_01_29_172655_create_activitys_table', 1),
(10, '2022_01_31_064308_create_speakers_table', 1),
(11, '2022_01_31_162008_create_ticket_types_table', 1),
(12, '2022_01_31_163309_create_tickets_table', 1),
(13, '2022_02_02_221125_create_sponsors_table', 1),
(14, '2022_02_03_223216_create_organizers_table', 1),
(15, '2022_02_04_034112_create_config_places_table', 1),
(16, '2022_02_07_223715_create_votes_table', 1),
(17, '2022_02_10_055550_create_surveys_table', 1),
(18, '2022_02_12_061755_create_candidates_table', 1),
(19, '2022_02_15_133400_create_communitys_table', 1),
(20, '2022_02_25_205826_create_clients_table', 1),
(21, '2022_02_25_205900_create_buytickets_table', 1),
(22, '2022_03_14_181033_create_candidate_votes_table', 1);

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

--
-- Table structure for table `organizers`
--

CREATE TABLE `organizers` (
  `id` int(10) UNSIGNED NOT NULL,
  `event_id` int(10) UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `logo` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `activity_area` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `create_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `update_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `personal_access_tokens`
--

CREATE TABLE `personal_access_tokens` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tokenable_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `tokenable_id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `token` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,
  `abilities` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `last_used_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `social_links`
--

CREATE TABLE `social_links` (
  `id` int(10) UNSIGNED NOT NULL,
  `event_id` int(10) UNSIGNED NOT NULL,
  `label` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `link` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `create_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `update_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `speakers`
--

CREATE TABLE `speakers` (
  `id` int(10) UNSIGNED NOT NULL,
  `activity_id` int(10) UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `photo` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `activity_area` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `create_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `update_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `sponsors`
--

CREATE TABLE `sponsors` (
  `id` int(10) UNSIGNED NOT NULL,
  `event_id` int(10) UNSIGNED NOT NULL,
  `type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `logo` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `activity_sector` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `create_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `update_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `surveys`
--

CREATE TABLE `surveys` (
  `id` int(10) UNSIGNED NOT NULL,
  `event_id` int(10) UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `create_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `update_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `tickets`
--

CREATE TABLE `tickets` (
  `id` int(10) UNSIGNED NOT NULL,
  `event_id` int(10) UNSIGNED NOT NULL,
  `ticket_type_id` int(10) UNSIGNED DEFAULT NULL,
  `free` tinyint(1) NOT NULL DEFAULT 0,
  `price` int(11) DEFAULT NULL,
  `number` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `description` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `qrcode` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `qrid` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `model_message` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `create_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `update_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `ticket_types`
--

CREATE TABLE `ticket_types` (
  `id` int(10) UNSIGNED NOT NULL,
  `label` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `create_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `update_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ticket_types`
--

INSERT INTO `ticket_types` (`id`, `label`, `create_at`, `update_at`) VALUES
(1, 'Standard', '2022-06-13 21:47:22', '2022-06-13 21:47:22'),
(2, 'VIP', '2022-06-13 21:47:22', '2022-06-13 21:47:22');

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

--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `id` int(10) UNSIGNED NOT NULL,
  `user_type_id` int(10) UNSIGNED NOT NULL DEFAULT 1,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `firstname` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `phone_number` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `civility` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `entreprise` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `country` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `create_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `update_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `users`
--

INSERT INTO `users` (`id`, `user_type_id`, `name`, `firstname`, `password`, `email`, `phone_number`, `civility`, `entreprise`, `country`, `create_at`, `update_at`) VALUES
(1, 1, 'Jerry', 'Morgan', '$2y$10$9n5RzrqpZDE.FIitJrj5OOH38mfFnEkA74Ot6p/M4Mu1.xumo7.tK', 'promoter@gmail.com', '66248499', 'homme', NULL, 'Bénin', '2022-02-22 17:02:18', '2022-02-22 17:02:18'),
(8, 1, 'HOund', 'AMbroise', '$2y$10$faH6muR8EihvUSu2ASuc6.csGnqzV.zCbkCzQY6Lkhxc24s4MXYi.', 'ambroise.hound@gmail.com', '66248495', 'homme', NULL, '+213', '2022-03-06 13:20:47', '2022-03-06 13:20:47'),
(9, 1, 'ADJAHO', 'Corinne', '$2y$10$EUOf27VlwjFmxmChT0ncne42DujcaRdSs8.sysjs6C1wFG4HZQp/O', 'adjahocorinne@gmail.com', '67185609', 'femme', NULL, '+229', '2022-03-07 13:55:14', '2022-03-07 13:55:14'),
(10, 2, 'ADANKON', 'Gerlix Bienvenu', '$2y$10$YFVOzx7YcXgtOn8Lh7HP/e9Gj5fjS/tNcGOR5pnxrHgCw8OXY0KSG', 'bienvenu.adankon@aiesec.net', '94055887', 'homme', NULL, '+229', '2022-03-09 14:55:15', '2022-03-09 14:55:15'),
(11, 1, 'DANHIN', 'Bignon Élie', '$2y$10$WfteAZjNAD4i7.HC7wEliOk7EMDXYHyRUPG9Q9j6RJRIm1tQ/abT2', 'bigdanhe@gmail.com', '69319576', 'homme', NULL, '+229', '2022-03-16 13:19:31', '2022-03-16 13:19:31'),
(12, 1, 'SODEGANDJI', 'Eustache', '$2y$10$5z0bcNDSRCAUpkwoRJktbu/fT7M6UEucceTEDps0z4ngJsF.N2dP6', 'sodegandjieustache@gmail.com', '67268888', 'homme', NULL, '+229', '2022-03-26 16:21:55', '2022-03-26 16:21:55'),
(13, 1, 'SODEGANDJI', 'Eustache', '$2y$10$BRsorLJasDHoov0IdVbE2u6g885zsFeLtfo9qwiPlLepPgJHo0yvy', 'sodeusta.leboss@gmail.com', '61113121', 'homme', NULL, '+229', '2022-03-26 16:24:25', '2022-03-26 16:24:25'),
(14, 1, 'SODEGANDJI', 'Eustache', '$2y$10$tgGPq2nG.FMB/0R3ZXCdeeMH1/qgRrWPNybG0wB.zRlT8RiAp0uPi', 'contact.3bprod@gmail.com', '67864202', 'homme', NULL, '+229', '2022-03-26 21:08:09', '2022-03-26 21:08:09'),
(15, 3, 'heszh', 'hesh', '$2y$10$bckeTwBsXB5famV.0eNSdumEyjYYnSqy/uv50ucd2MAZ3uopBpvO.', 'viniwi3735@f1xm.com', '66466454', 'homme', NULL, '+257', '2022-03-26 22:08:44', '2022-03-26 22:08:44'),
(16, 1, 'hshh', 'tgeji', '$2y$10$pwTDyuARz070YZKSX.e9EexOPoPFHuPfeIYcgIA6mz.v8Gj7Ftzyq', 'yarisa2949@flowminer.com', '65421542', 'homme', NULL, '+237', '2022-03-26 22:14:46', '2022-03-26 22:14:46'),
(17, 1, 'Dankson', 'Bienv', '$2y$10$c9lI8gOucL1DjKSgipm.TeQx8ZBkNhKNJH5SJxrjWO3e5PJvJRjDu', 'adolixtcom@gmail.com', '98845005', 'homme', NULL, '+228', '2022-03-27 02:22:15', '2022-03-27 02:22:15'),
(18, 1, 'SODEGANDJI', 'Eustache', '$2y$10$3I3gHveYj2rUOuU37nGGJeXqgMYnIeSEKytT84QUx79G8x9QmXlje', 'sodegandjieustache1@gmail.com', '94252441', 'homme', NULL, '+229', '2022-03-27 10:11:53', '2022-03-27 10:11:53'),
(19, 1, 'Kabowd', 'Aravna', '$2y$10$4qaCYe00FwWlbz64TCewEe7McSrBxWPi8IXfByLqXqDoBDWS448ce', 'contact.aravna@gmail.com', '67027676', 'homme', NULL, '+229', '2022-03-27 10:37:28', '2022-03-27 10:37:28'),
(20, 1, 'DANHIN', 'eliedanhin', '$2y$10$tBmXZU/AssNbJ/gq.6vgleh3q70MTWu.N9ZvDH6mgtoKnR/wNy1ii', 'eliedanhin@gmail.com', '12345678', 'homme', NULL, '+229', '2022-03-27 10:44:34', '2022-03-27 10:44:34'),
(21, 1, 'Martinien', 'Armel', '$2y$10$cla7k9cf/CsqEvee/cA09.LqcXZVwRkmJxdonj96BPTF3JP5Ww38W', 'laregos2@gmail.com', '22996144173', 'homme', NULL, '+229', '2022-04-07 22:05:02', '2022-04-07 22:05:02'),
(22, 3, 'Medehou', 'Junior', '$2y$10$pia3NcGaMDUaw3qErL8kwuTT367HY8qhQb0bwy4K3zD8PGxuL/yuW', NULL, '66478052', NULL, NULL, NULL, '2022-04-14 14:08:26', '2022-04-14 14:08:26'),
(23, 3, 'gaga', 'grace', '$2y$10$Ww3fK7p5JMDXL.Kv83KPvuolleAABt/Hzy/EPNvlSkx7FJFRWpXRy', NULL, '96000007', NULL, NULL, NULL, '2022-04-19 15:37:34', '2022-04-19 15:37:34'),
(24, 3, 'yea', 'yena', '$2y$10$e5NhPteW5UVc2p.4XOnjCumkCHGBoscx/vbpNF7F3CHCWXhxiz1JG', NULL, '96003030', NULL, NULL, NULL, '2022-05-10 14:58:38', '2022-05-10 14:58:38'),
(25, 3, 'al', 'pr', '$2y$10$Aa9okXCkQwNujdGn35cBF.efpn/vugOt810c5aQdcR0Cl1wFurU7y', NULL, '99999999', NULL, NULL, NULL, '2022-05-10 17:05:32', '2022-05-10 17:05:32'),
(26, 3, 'alec', 'alec', '$2y$10$Ih7LcvMmOCDWCTM4Exy.R.ApIoKy1L/tt2hMtp3XarRXS93b2tB/6', NULL, '99861561', NULL, NULL, NULL, '2022-05-10 18:52:36', '2022-05-10 18:52:36'),
(27, 1, 'Yehadji', 'Alexis', '$2y$10$Ih7LcvMmOCDWCTM4Exy.R.ApIoKy1L/tt2hMtp3XarRXS93b2tB/6', 'alecalec147@gmail.com', '70668208', 'homme', NULL, '+228', '2022-05-26 11:03:48', '2022-05-26 11:03:48'),
(28, 3, 'al', 'alec', '$2y$10$TCncj2z8VQKgPEedGjtxJOyijezoxetPVQ3dEeHUXzoGWu24ClrQa', 'webdevoloperalec@gmail.com', '22899861561', 'homme', NULL, '+228', '2022-06-10 09:53:35', '2022-06-10 09:53:35');

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

--
-- Table structure for table `user_types`
--

CREATE TABLE `user_types` (
  `id` int(10) UNSIGNED NOT NULL,
  `label` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `create_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `update_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `user_types`
--

INSERT INTO `user_types` (`id`, `label`, `create_at`, `update_at`) VALUES
(1, 'promoter', '2022-06-13 21:47:18', '2022-06-13 21:47:18'),
(2, 'admin', '2022-06-13 21:47:18', '2022-06-13 21:47:18'),
(3, 'customer', '2022-06-13 21:47:19', '2022-06-13 21:47:19');

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

--
-- Table structure for table `user_verifys`
--

CREATE TABLE `user_verifys` (
  `id` int(10) UNSIGNED NOT NULL,
  `user_id` int(10) UNSIGNED NOT NULL,
  `token` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `token_password` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `create_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `update_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `user_verifys`
--

INSERT INTO `user_verifys` (`id`, `user_id`, `token`, `token_password`, `create_at`, `update_at`) VALUES
(1, 1, NULL, NULL, '2022-02-22 17:02:18', '2022-02-22 17:02:18'),
(8, 8, NULL, NULL, '2022-03-06 13:20:47', '2022-03-06 13:20:47'),
(9, 9, NULL, NULL, '2022-03-07 13:55:14', '2022-03-07 13:55:14'),
(10, 10, NULL, NULL, '2022-03-09 14:55:15', '2022-03-09 14:55:15'),
(11, 11, NULL, NULL, '2022-03-16 13:19:31', '2022-03-16 13:19:31'),
(12, 12, 'vourx3DXMH927urhFgVIqAUTDOarNBUB623f4bb3253e39.34839361', NULL, '2022-03-26 16:21:55', '2022-03-26 16:21:55'),
(13, 13, 'rwAUFDDwAW7aXgQjFPPqD883VP645rO9623f4c491c2434.71210006', NULL, '2022-03-26 16:24:25', '2022-03-26 16:24:25'),
(14, 14, 'sWjeWnY6E5VdzdmjZu1gGKIwkS7zw9yw623f8ec9526622.52490506', NULL, '2022-03-26 21:08:09', '2022-03-26 21:08:09'),
(15, 15, 'WrUodGnhq6Tj0ozYXoan219zyMLTzDyN623f9cfc18d009.32741542', NULL, '2022-03-26 22:08:44', '2022-03-26 22:08:44'),
(16, 16, NULL, NULL, '2022-03-26 22:14:46', '2022-03-26 22:14:46'),
(17, 17, NULL, NULL, '2022-03-27 02:22:15', '2022-03-27 02:22:15'),
(18, 18, 'Di81Sz27TXDEKce7t7z73F0mIhoJqjC262404679d507b6.99694337', NULL, '2022-03-27 10:11:53', '2022-03-27 10:11:53'),
(19, 19, NULL, NULL, '2022-03-27 10:37:28', '2022-03-27 10:37:28'),
(20, 20, 'HXxFh6VkM2OxkJEdY9LIcwYcjxGVeZZu62404e2296e177.89068538', NULL, '2022-03-27 10:44:34', '2022-03-27 10:44:34'),
(21, 21, NULL, NULL, '2022-04-07 22:05:02', '2022-04-07 22:05:02'),
(22, 22, NULL, NULL, '2022-04-14 14:08:26', '2022-04-14 14:08:26'),
(23, 23, NULL, NULL, '2022-04-19 15:37:34', '2022-04-19 15:37:34'),
(24, 24, NULL, NULL, '2022-05-10 14:58:38', '2022-05-10 14:58:38'),
(25, 25, NULL, NULL, '2022-05-10 17:05:32', '2022-05-10 17:05:32'),
(26, 26, NULL, NULL, '2022-05-10 18:52:36', '2022-05-10 18:52:36'),
(27, 27, NULL, NULL, '2022-05-26 11:03:48', '2022-05-26 11:03:48'),
(28, 28, NULL, NULL, '2022-06-10 09:53:35', '2022-06-10 09:53:35');

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

--
-- Table structure for table `votes`
--

CREATE TABLE `votes` (
  `id` int(10) UNSIGNED NOT NULL,
  `event_id` int(10) UNSIGNED NOT NULL,
  `price` int(11) DEFAULT NULL,
  `type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `number` int(11) DEFAULT NULL,
  `channel` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `promoter` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `date_since` datetime NOT NULL,
  `date_end` datetime NOT NULL,
  `link` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `country` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `free` tinyint(1) NOT NULL,
  `create_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `update_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `activitys`
--
ALTER TABLE `activitys`
  ADD PRIMARY KEY (`id`),
  ADD KEY `activitys_chronogram_id_foreign` (`chronogram_id`);

--
-- Indexes for table `buytickets`
--
ALTER TABLE `buytickets`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `buytickets_uuid_unique` (`uuid`),
  ADD KEY `buytickets_client_id_foreign` (`client_id`),
  ADD KEY `buytickets_ticket_id_foreign` (`ticket_id`);

--
-- Indexes for table `candidates`
--
ALTER TABLE `candidates`
  ADD PRIMARY KEY (`id`),
  ADD KEY `candidates_vote_id_foreign` (`vote_id`);

--
-- Indexes for table `candidate_votes`
--
ALTER TABLE `candidate_votes`
  ADD PRIMARY KEY (`id`),
  ADD KEY `candidate_votes_client_id_foreign` (`client_id`),
  ADD KEY `candidate_votes_candidate_id_foreign` (`candidate_id`);

--
-- Indexes for table `chronograms`
--
ALTER TABLE `chronograms`
  ADD PRIMARY KEY (`id`),
  ADD KEY `chronograms_event_id_foreign` (`event_id`);

--
-- Indexes for table `clients`
--
ALTER TABLE `clients`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `clients_phone_number_unique` (`phone_number`),
  ADD UNIQUE KEY `clients_email_unique` (`email`);

--
-- Indexes for table `communitys`
--
ALTER TABLE `communitys`
  ADD PRIMARY KEY (`id`),
  ADD KEY `communitys_owner_foreign` (`owner`),
  ADD KEY `communitys_guest_foreign` (`guest`),
  ADD KEY `communitys_event_id_foreign` (`event_id`);

--
-- Indexes for table `config_places`
--
ALTER TABLE `config_places`
  ADD PRIMARY KEY (`id`),
  ADD KEY `config_places_event_id_foreign` (`event_id`);

--
-- Indexes for table `events`
--
ALTER TABLE `events`
  ADD PRIMARY KEY (`id`),
  ADD KEY `events_user_id_foreign` (`user_id`),
  ADD KEY `events_event_type_id_foreign` (`event_type_id`);

--
-- Indexes for table `event_types`
--
ALTER TABLE `event_types`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `migrations`
--
ALTER TABLE `migrations`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `organizers`
--
ALTER TABLE `organizers`
  ADD PRIMARY KEY (`id`),
  ADD KEY `organizers_event_id_foreign` (`event_id`);

--
-- Indexes for table `personal_access_tokens`
--
ALTER TABLE `personal_access_tokens`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `personal_access_tokens_token_unique` (`token`),
  ADD KEY `personal_access_tokens_tokenable_type_tokenable_id_index` (`tokenable_type`,`tokenable_id`);

--
-- Indexes for table `social_links`
--
ALTER TABLE `social_links`
  ADD PRIMARY KEY (`id`),
  ADD KEY `social_links_event_id_foreign` (`event_id`);

--
-- Indexes for table `speakers`
--
ALTER TABLE `speakers`
  ADD PRIMARY KEY (`id`),
  ADD KEY `speakers_activity_id_foreign` (`activity_id`);

--
-- Indexes for table `sponsors`
--
ALTER TABLE `sponsors`
  ADD PRIMARY KEY (`id`),
  ADD KEY `sponsors_event_id_foreign` (`event_id`);

--
-- Indexes for table `surveys`
--
ALTER TABLE `surveys`
  ADD PRIMARY KEY (`id`),
  ADD KEY `surveys_event_id_foreign` (`event_id`);

--
-- Indexes for table `tickets`
--
ALTER TABLE `tickets`
  ADD PRIMARY KEY (`id`),
  ADD KEY `tickets_event_id_foreign` (`event_id`),
  ADD KEY `tickets_ticket_type_id_foreign` (`ticket_type_id`);

--
-- Indexes for table `ticket_types`
--
ALTER TABLE `ticket_types`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `users_phone_number_unique` (`phone_number`),
  ADD UNIQUE KEY `users_email_unique` (`email`),
  ADD KEY `users_user_type_id_foreign` (`user_type_id`);

--
-- Indexes for table `user_types`
--
ALTER TABLE `user_types`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `user_verifys`
--
ALTER TABLE `user_verifys`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_verifys_user_id_foreign` (`user_id`);

--
-- Indexes for table `votes`
--
ALTER TABLE `votes`
  ADD PRIMARY KEY (`id`),
  ADD KEY `votes_event_id_foreign` (`event_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `activitys`
--
ALTER TABLE `activitys`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `buytickets`
--
ALTER TABLE `buytickets`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `candidates`
--
ALTER TABLE `candidates`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `candidate_votes`
--
ALTER TABLE `candidate_votes`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `chronograms`
--
ALTER TABLE `chronograms`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `clients`
--
ALTER TABLE `clients`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `communitys`
--
ALTER TABLE `communitys`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `config_places`
--
ALTER TABLE `config_places`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `events`
--
ALTER TABLE `events`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `event_types`
--
ALTER TABLE `event_types`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `migrations`
--
ALTER TABLE `migrations`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=23;

--
-- AUTO_INCREMENT for table `organizers`
--
ALTER TABLE `organizers`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `personal_access_tokens`
--
ALTER TABLE `personal_access_tokens`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `social_links`
--
ALTER TABLE `social_links`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `speakers`
--
ALTER TABLE `speakers`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `sponsors`
--
ALTER TABLE `sponsors`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `surveys`
--
ALTER TABLE `surveys`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `tickets`
--
ALTER TABLE `tickets`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ticket_types`
--
ALTER TABLE `ticket_types`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=29;

--
-- AUTO_INCREMENT for table `user_types`
--
ALTER TABLE `user_types`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `user_verifys`
--
ALTER TABLE `user_verifys`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=29;

--
-- AUTO_INCREMENT for table `votes`
--
ALTER TABLE `votes`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `activitys`
--
ALTER TABLE `activitys`
  ADD CONSTRAINT `activitys_chronogram_id_foreign` FOREIGN KEY (`chronogram_id`) REFERENCES `chronograms` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `buytickets`
--
ALTER TABLE `buytickets`
  ADD CONSTRAINT `buytickets_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `buytickets_ticket_id_foreign` FOREIGN KEY (`ticket_id`) REFERENCES `tickets` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `candidates`
--
ALTER TABLE `candidates`
  ADD CONSTRAINT `candidates_vote_id_foreign` FOREIGN KEY (`vote_id`) REFERENCES `votes` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `candidate_votes`
--
ALTER TABLE `candidate_votes`
  ADD CONSTRAINT `candidate_votes_candidate_id_foreign` FOREIGN KEY (`candidate_id`) REFERENCES `candidates` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `candidate_votes_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `chronograms`
--
ALTER TABLE `chronograms`
  ADD CONSTRAINT `chronograms_event_id_foreign` FOREIGN KEY (`event_id`) REFERENCES `events` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `communitys`
--
ALTER TABLE `communitys`
  ADD CONSTRAINT `communitys_event_id_foreign` FOREIGN KEY (`event_id`) REFERENCES `events` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `communitys_guest_foreign` FOREIGN KEY (`guest`) REFERENCES `users` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `communitys_owner_foreign` FOREIGN KEY (`owner`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `config_places`
--
ALTER TABLE `config_places`
  ADD CONSTRAINT `config_places_event_id_foreign` FOREIGN KEY (`event_id`) REFERENCES `events` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `events`
--
ALTER TABLE `events`
  ADD CONSTRAINT `events_event_type_id_foreign` FOREIGN KEY (`event_type_id`) REFERENCES `event_types` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `events_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `organizers`
--
ALTER TABLE `organizers`
  ADD CONSTRAINT `organizers_event_id_foreign` FOREIGN KEY (`event_id`) REFERENCES `events` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `social_links`
--
ALTER TABLE `social_links`
  ADD CONSTRAINT `social_links_event_id_foreign` FOREIGN KEY (`event_id`) REFERENCES `events` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `speakers`
--
ALTER TABLE `speakers`
  ADD CONSTRAINT `speakers_activity_id_foreign` FOREIGN KEY (`activity_id`) REFERENCES `activitys` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `sponsors`
--
ALTER TABLE `sponsors`
  ADD CONSTRAINT `sponsors_event_id_foreign` FOREIGN KEY (`event_id`) REFERENCES `events` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `surveys`
--
ALTER TABLE `surveys`
  ADD CONSTRAINT `surveys_event_id_foreign` FOREIGN KEY (`event_id`) REFERENCES `events` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `tickets`
--
ALTER TABLE `tickets`
  ADD CONSTRAINT `tickets_event_id_foreign` FOREIGN KEY (`event_id`) REFERENCES `events` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `tickets_ticket_type_id_foreign` FOREIGN KEY (`ticket_type_id`) REFERENCES `ticket_types` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `users`
--
ALTER TABLE `users`
  ADD CONSTRAINT `users_user_type_id_foreign` FOREIGN KEY (`user_type_id`) REFERENCES `user_types` (`id`);

--
-- Constraints for table `user_verifys`
--
ALTER TABLE `user_verifys`
  ADD CONSTRAINT `user_verifys_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `votes`
--
ALTER TABLE `votes`
  ADD CONSTRAINT `votes_event_id_foreign` FOREIGN KEY (`event_id`) REFERENCES `events` (`id`) ON DELETE CASCADE;
COMMIT;

