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

START TRANSACTION;



--
-- Database: `soccer`
--

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

--
-- Table structure for table `competition`
--

CREATE TABLE `competition` (
  `id` int(11) NOT NULL,
  `competition_id` int(11) NOT NULL,
  `team_a` varchar(255) NOT NULL,
  `team_b` varchar(255) NOT NULL,
  `time` varchar(255) NOT NULL,
  `date_time` datetime NOT NULL,
  `date` date NOT NULL,
  `minute` varchar(50) DEFAULT NULL,
  `minute_extra` varchar(50) DEFAULT NULL,
  `status` varchar(50) NOT NULL,
  `match_period` varchar(50) DEFAULT NULL,
  `if_sent_reminder_before_hour` int(11) NOT NULL DEFAULT '0',
  `if_sent_reminder_when_match_start` int(11) NOT NULL DEFAULT '0',
  `if_sent_reminder_end_competition` int(11) NOT NULL DEFAULT '0',
  `if_sent_reminder_end_first_half` int(11) NOT NULL DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `competition`
--

INSERT INTO `competition` (`id`, `competition_id`, `team_a`, `team_b`, `time`, `date_time`, `date`, `minute`, `minute_extra`, `status`, `match_period`, `if_sent_reminder_before_hour`, `if_sent_reminder_when_match_start`, `if_sent_reminder_end_competition`, `if_sent_reminder_end_first_half`, `created_at`, `updated_at`) VALUES
(1, 130125, 'روما', 'برشلونة', '1523385900', '2018-04-10 18:45:00', '2018-04-10', NULL, NULL, 'fixture', '', 1, 0, 0, 0, '2018-04-10 09:27:12', '2018-04-10 14:51:34'),
(2, 130127, 'مانشستر سيتي', 'ليفربول', '1523385900', '2018-04-10 18:45:00', '2018-04-10', NULL, NULL, 'fixture', '', 1, 0, 0, 0, '2018-04-10 09:32:39', '2018-04-10 14:51:34'),
(3, 117475, 'إستوديانتس', 'تشاكاريتا جونيورز', '1523319300', '2018-04-10 00:15:00', '2018-04-10', '90', '3', 'played', 'FT', 0, 0, 0, 0, '2018-04-10 09:32:39', '2018-04-10 14:51:34'),
(4, 130696, 'جوتنبورج', 'هاماربي', '1523379600', '2018-04-10 17:00:00', '2018-04-10', '17', NULL, 'playing', '1H', 1, 1, 0, 0, '2018-04-10 09:32:39', '2018-04-10 17:17:50'),
(5, 130715, 'Al Shorta', 'الأهلي الخرطوم', '1523368800', '2018-04-10 14:00:00', '2018-04-10', NULL, NULL, 'fixture', '', 1, 0, 0, 0, '2018-04-10 09:32:39', '2018-04-10 14:51:34'),
(6, 125355, 'كاظمة', 'النصر', '1523370300', '2018-04-10 14:25:00', '2018-04-10', NULL, NULL, 'fixture', '', 1, 0, 0, 0, '2018-04-10 09:32:40', '2018-04-10 14:51:34'),
(7, 125356, 'الجهراء', 'القادسية', '1523379000', '2018-04-10 16:50:00', '2018-04-10', NULL, NULL, 'fixture', '', 1, 0, 0, 0, '2018-04-10 09:32:40', '2018-04-10 14:51:34'),
(8, 126934, 'هوايبول', 'Fu Jen University', '1523341800', '2018-04-10 06:30:00', '2018-04-10', NULL, NULL, 'played', 'FT', 0, 0, 0, 0, '2018-04-10 09:32:40', '2018-04-10 14:51:34'),
(9, 126199, 'سونغ لام نغي آن', 'تامبينيز روفرز', '1523349000', '2018-04-10 08:30:00', '2018-04-10', '90', '2', 'played', 'FT', 0, 0, 0, 0, '2018-04-10 09:32:40', '2018-04-10 14:51:34'),
(10, 126929, 'Persija', 'جوهور', '1523359800', '2018-04-10 11:30:00', '2018-04-10', '90', '3', 'played', 'FT', 0, 0, 0, 0, '2018-04-10 09:32:40', '2018-04-10 14:51:35'),
(11, 126912, 'بنجلور', 'نيو راديانت', '1523370600', '2018-04-10 14:30:00', '2018-04-10', '90', '3', 'played', 'FT', 1, 1, 1, 0, '2018-04-10 09:32:40', '2018-04-10 16:24:18'),
(12, 126901, 'الزوراء', 'العهد', '1523372400', '2018-04-10 15:00:00', '2018-04-10', '90', '7', 'played', 'FT', 1, 1, 1, 0, '2018-04-10 09:32:40', '2018-04-10 16:57:14'),
(13, 126897, 'الجزيرة', 'القوة الجوية', '1523372400', '2018-04-10 15:00:00', '2018-04-10', '90', '4', 'played', 'FT', 1, 1, 1, 0, '2018-04-10 09:32:40', '2018-04-10 16:57:14'),
(14, 125753, 'السويق', 'المالكية', '1523372400', '2018-04-10 15:00:00', '2018-04-10', '90', '6', 'played', 'FT', 1, 1, 1, 0, '2018-04-10 09:32:40', '2018-04-10 16:57:14'),
(15, 125755, 'الجيش', 'المنامة', '1523375100', '2018-04-10 15:45:00', '2018-04-10', '74', NULL, 'playing', '2H', 1, 1, 0, 1, '2018-04-10 09:32:40', '2018-04-10 17:17:50');

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

--
-- Table structure for table `competition_event`
--

CREATE TABLE `competition_event` (
  `id` int(11) NOT NULL,
  `event_id` int(11) NOT NULL,
  `code` varchar(50) NOT NULL,
  `team` varchar(50) NOT NULL,
  `player` varchar(255) NOT NULL,
  `minute` varchar(50) NOT NULL,
  `if_sent_reminder` int(11) NOT NULL DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `competition_event`
--

INSERT INTO `competition_event` (`id`, `event_id`, `code`, `team`, `player`, `minute`, `if_sent_reminder`, `created_at`, `updated_at`) VALUES
(1, 944110, 'YC', 'b', 'غوتور', '35', 0, '2018-04-10 12:56:13', '2018-04-10 15:56:13'),
(2, 944109, 'YC', 'a', 'J. Lourenco', '10', 0, '2018-04-10 12:56:13', '2018-04-10 15:56:13'),
(3, 944113, 'YC', 'a', 'B. Howells', '13', 0, '2018-04-10 13:08:18', '2018-04-10 16:08:18'),
(4, 944111, 'G', 'b', 'Sayed Hashim', '12', 0, '2018-04-10 13:08:18', '2018-04-10 16:08:18'),
(5, 911340, 'YC', 'b', 'علي حرم', '34', 0, '2018-04-10 13:08:19', '2018-04-10 16:08:19'),
(6, 944117, 'YC', 'b', 'نور منصور', '36', 0, '2018-04-10 13:13:10', '2018-04-10 16:13:10'),
(7, 944128, 'YC', 'b', 'لويس جوستافو', '26', 0, '2018-04-10 13:13:11', '2018-04-10 16:13:11'),
(8, 944138, 'YC', 'b', 'حسان شعيتو', '59', 0, '2018-04-10 13:25:57', '2018-04-10 16:25:57'),
(9, 944147, 'YC', 'a', 'Noor Al Rawabdeh', '67', 0, '2018-04-10 13:25:58', '2018-04-10 16:25:58'),
(10, 944114, 'YC', 'b', 'Ahmed Abdulridha', '30', 0, '2018-04-10 13:25:58', '2018-04-10 16:25:58'),
(11, 944143, 'YC', 'b', 'سيد هاشم', '65', 0, '2018-04-10 13:25:58', '2018-04-10 16:25:58'),
(12, 944144, 'RC', 'a', 'Omer Fazari', '65', 0, '2018-04-10 13:25:59', '2018-04-10 16:25:59'),
(13, 944136, 'G', 'a', 'Khalid Khalifa Al Hajri', '60', 0, '2018-04-10 13:25:59', '2018-04-10 16:25:59'),
(14, 944152, 'G', 'a', 'محمد رضوان كلجي', '45', 0, '2018-04-10 13:39:21', '2018-04-10 16:39:21'),
(15, 944192, 'YC', 'a', 'ورد سلامة', '69', 0, '2018-04-10 14:17:51', '2018-04-10 17:17:51'),
(16, 944191, 'YC', 'b', 'Ali Habib', '57', 0, '2018-04-10 14:17:51', '2018-04-10 17:17:51');

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

--
-- Table structure for table `competition_user`
--

CREATE TABLE `competition_user` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `competition_id` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `competition_user`
--

INSERT INTO `competition_user` (`id`, `user_id`, `competition_id`, `created_at`, `updated_at`) VALUES
(3, 1, 1523347180, '2018-04-10 08:25:45', '2018-04-10 11:25:45');

--
-- Indexes for dumped tables
--

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

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

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

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `competition`
--
ALTER TABLE `competition`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;

--
-- AUTO_INCREMENT for table `competition_event`
--
ALTER TABLE `competition_event`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;

--
-- AUTO_INCREMENT for table `competition_user`
--
ALTER TABLE `competition_user`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
COMMIT;

