/**
 * @package     SP Soccer
 * @author      JoomShaper http://www.joomshaper.com
 * @copyright   Copyright (C) 2010 - 2017 JoomShaper. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

--
-- Table structure for table ``spsoccer_gameteams`
--

CREATE TABLE IF NOT EXISTS `#__spsoccer_gameteams` (
  `spsoccer_gameteam_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL DEFAULT '',
  `team_type` varchar(20) DEFAULT NULL,
  `description` text NOT NULL,
  `city` varchar(50) DEFAULT NULL,
  `logo` varchar(255) DEFAULT NULL,
  `team_gallery` text,
  `facebook` varchar(255) DEFAULT '',
  `twitter` varchar(255) DEFAULT '',
  `dribbble` varchar(255) DEFAULT '',
  `g_plus` varchar(255) DEFAULT '',
  `youtube` varchar(255) DEFAULT '',
  `established` int(6) DEFAULT NULL,
  `total_title` int(6) DEFAULT NULL,
  `former_president` int(11) DEFAULT NULL,
  `manager` int(11) DEFAULT NULL,
  `list_honours` text,
  `h_jersey` varchar(255) DEFAULT '',
  `a_jersey` varchar(255) DEFAULT '',
  `language` char(7) NOT NULL DEFAULT '*',
  `access` int(11) NOT NULL DEFAULT '1',
  `enabled` tinyint(1) NOT NULL DEFAULT '1',
  `ordering` int(10) NOT NULL DEFAULT '0',
  `created_by` bigint(20) NOT NULL DEFAULT '0',
  `created_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `modified_by` bigint(20) NOT NULL DEFAULT '0',
  `modified_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `locked_by` bigint(20) NOT NULL DEFAULT '0',
  `locked_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`spsoccer_gameteam_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Create syntax for TABLE '#__spsoccer_groups'
CREATE TABLE IF NOT EXISTS `#__spsoccer_groups` (
  `spsoccer_group_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL DEFAULT '',
  `spsoccer_tournament_id` int(11) DEFAULT NULL,
  `spsoccer_gameteam_id` text,
  `point_table` text NOT NULL,
  `description` text NOT NULL,
  `language` char(7) NOT NULL DEFAULT '*',
  `access` int(11) NOT NULL DEFAULT '1',
  `enabled` tinyint(1) NOT NULL DEFAULT '1',
  `ordering` int(10) NOT NULL DEFAULT '0',
  `created_by` bigint(20) NOT NULL DEFAULT '0',
  `created_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `modified_by` bigint(20) NOT NULL DEFAULT '0',
  `modified_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `locked_by` bigint(20) NOT NULL DEFAULT '0',
  `locked_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`spsoccer_group_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Create syntax for TABLE '#__spsoccer_matches'
CREATE TABLE IF NOT EXISTS `#__spsoccer_matches` (
  `spsoccer_match_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL DEFAULT '',
  `slug` varchar(255) NOT NULL DEFAULT '',
  `description` text NOT NULL,
  `image` varchar(255) DEFAULT NULL,
  `teamone` int(11) NOT NULL,
  `teamtwo` int(11) NOT NULL,
  `spsoccer_tournament_id` int(11) NOT NULL,
  `spsoccer_session_id` int(11) NOT NULL,
  `spsoccer_vanue_id` int(11) NOT NULL,
  `date` date NOT NULL DEFAULT '0000-00-00',
  `time` time NOT NULL DEFAULT '00:00:00',
  `played_game` tinyint(1) NOT NULL DEFAULT '0',
  `teamone_score` int(11) DEFAULT NULL,
  `teamtwo_score` int(11) DEFAULT NULL,
  `play_time` varchar(11) DEFAULT '00:00:00',
  `won_team` tinyint(11) DEFAULT NULL,
  `list_teamone_score` text,
  `list_match_stats` text,
  `list_teamtwo_score` text,
  `list_substitutes` text,
  `list_match_timeline` text,
  `teamone_formation` varchar(10) DEFAULT NULL,
  `teamtwo_formation` varchar(10) DEFAULT NULL,
  `teamone_players` text,
  `teamtwo_players` text,
  `language` char(7) NOT NULL DEFAULT '*',
  `access` int(11) NOT NULL DEFAULT '1',
  `enabled` tinyint(1) NOT NULL DEFAULT '1',
  `ordering` int(10) NOT NULL DEFAULT '0',
  `created_by` bigint(20) NOT NULL DEFAULT '0',
  `created_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `modified_by` bigint(20) NOT NULL DEFAULT '0',
  `modified_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `locked_by` bigint(20) NOT NULL DEFAULT '0',
  `locked_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`spsoccer_match_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Create syntax for TABLE '#__spsoccer_players'
CREATE TABLE IF NOT EXISTS `#__spsoccer_players` (
  `spsoccer_player_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL DEFAULT '',
  `spsoccer_gameteam_id` int(11) DEFAULT NULL,
  `description` text NOT NULL,
  `full_name` varchar(50) DEFAULT NULL,
  `image` varchar(255) DEFAULT NULL,
  `banner_image` varchar(255) DEFAULT NULL,
  `spsoccer_possition_id` int(11) DEFAULT NULL,
  `person_type` varchar(55) NOT NULL,
  `facebook` varchar(255) NOT NULL,
  `twitter` varchar(255) NOT NULL,
  `dribbble` varchar(255) NOT NULL,
  `g_plus` varchar(255) NOT NULL,
  `youtube` varchar(255) NOT NULL,
  `dob` date DEFAULT '0000-00-00',
  `birth_place` varchar(100) DEFAULT NULL,
  `squad_no` tinyint(3) DEFAULT NULL,
  `height` varchar(11) DEFAULT NULL,
  `weight` varchar(11) DEFAULT NULL,
  `total_matches` int(11) DEFAULT NULL,
  `discipline` varchar(55) DEFAULT NULL,
  `passing` varchar(55) DEFAULT NULL,
  `total_goals` int(11) DEFAULT NULL,
  `club_debut_date` date DEFAULT '0000-00-00',
  `previous_club` int(11) DEFAULT NULL,
  `language` char(7) NOT NULL DEFAULT '*',
  `access` int(11) NOT NULL DEFAULT '1',
  `enabled` tinyint(1) NOT NULL DEFAULT '1',
  `ordering` int(10) NOT NULL DEFAULT '0',
  `modified_by` bigint(20) NOT NULL DEFAULT '0',
  `modified_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `created_by` bigint(20) NOT NULL DEFAULT '0',
  `created_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `locked_by` bigint(20) NOT NULL DEFAULT '0',
  `locked_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`spsoccer_player_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Create syntax for TABLE '#__spsoccer_polloptions'
CREATE TABLE IF NOT EXISTS `#__spsoccer_polloptions` (
  `spsoccer_polloption_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL DEFAULT '',
  `vote` bigint(20) NOT NULL DEFAULT '0',
  `enabled` tinyint(1) NOT NULL DEFAULT '1',
  `ordering` int(10) NOT NULL DEFAULT '0',
  `created_by` bigint(20) NOT NULL DEFAULT '0',
  `created_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `modified_by` bigint(20) NOT NULL DEFAULT '0',
  `modified_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `locked_by` bigint(20) NOT NULL DEFAULT '0',
  `locked_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`spsoccer_polloption_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Create syntax for TABLE '#__spsoccer_polls'
CREATE TABLE IF NOT EXISTS `#__spsoccer_polls` (
  `spsoccer_poll_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL DEFAULT '',
  `description` text NOT NULL,
  `list_options` text,
  `language` char(7) NOT NULL DEFAULT '*',
  `access` int(11) NOT NULL DEFAULT '1',
  `enabled` tinyint(1) NOT NULL DEFAULT '1',
  `ordering` int(10) NOT NULL DEFAULT '0',
  `created_by` bigint(20) NOT NULL DEFAULT '0',
  `created_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `modified_by` bigint(20) NOT NULL DEFAULT '0',
  `modified_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `locked_by` bigint(20) NOT NULL DEFAULT '0',
  `locked_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`spsoccer_poll_id`)
) ENGINE=InnoDBDEFAULT CHARSET=utf8;

-- Create syntax for TABLE '#__spsoccer_possitions'
CREATE TABLE IF NOT EXISTS `#__spsoccer_possitions` (
  `spsoccer_possition_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL DEFAULT '',
  `enabled` tinyint(1) DEFAULT NULL,
  `ordering` int(10) NOT NULL DEFAULT '0',
  `created_by` bigint(20) NOT NULL DEFAULT '0',
  `created_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `modified_by` bigint(20) NOT NULL DEFAULT '0',
  `modified_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `locked_by` bigint(20) NOT NULL DEFAULT '0',
  `locked_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `description` text NOT NULL,
  PRIMARY KEY (`spsoccer_possition_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Create syntax for TABLE '#__spsoccer_sessions'
CREATE TABLE IF NOT EXISTS `#__spsoccer_sessions` (
  `spsoccer_session_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL DEFAULT '',
  `image` varchar(255) DEFAULT NULL,
  `spsoccer_tournament_id` int(11) DEFAULT NULL,
  `vanue` int(11) DEFAULT NULL,
  `description` text NOT NULL,
  `language` char(7) NOT NULL DEFAULT '*',
  `access` int(11) NOT NULL DEFAULT '1',
  `enabled` tinyint(1) NOT NULL DEFAULT '1',
  `ordering` int(10) NOT NULL DEFAULT '0',
  `created_by` bigint(20) NOT NULL DEFAULT '0',
  `created_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `modified_by` bigint(20) NOT NULL DEFAULT '0',
  `modified_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `locked_by` bigint(20) NOT NULL DEFAULT '0',
  `locked_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`spsoccer_session_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Create syntax for TABLE '#__spsoccer_tournaments'
CREATE TABLE IF NOT EXISTS `#__spsoccer_tournaments` (
  `spsoccer_tournament_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL,
  `slug` varchar(255) DEFAULT NULL,
  `year` varchar(100) NOT NULL,
  `region` varchar(100) NOT NULL,
  `description` text NOT NULL,
  `image` varchar(255) DEFAULT NULL,
  `language` char(7) NOT NULL DEFAULT '*',
  `access` int(11) NOT NULL DEFAULT '1',
  `enabled` tinyint(1) NOT NULL DEFAULT '1',
  `ordering` int(10) NOT NULL DEFAULT '0',
  `created_by` bigint(20) NOT NULL DEFAULT '0',
  `created_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `modified_by` bigint(20) NOT NULL DEFAULT '0',
  `modified_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `locked_by` bigint(20) NOT NULL DEFAULT '0',
  `locked_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`spsoccer_tournament_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Create syntax for TABLE '#__spsoccer_vanues'
CREATE TABLE IF NOT EXISTS `#__spsoccer_vanues` (
  `spsoccer_vanue_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL DEFAULT '',
  `description` text NOT NULL,
  `gallery` text,
  `map` text,
  `socials` text,
  `language` char(7) NOT NULL DEFAULT '*',
  `access` int(11) NOT NULL DEFAULT '1',
  `enabled` tinyint(1) DEFAULT '1',
  `ordering` int(10) NOT NULL DEFAULT '0',
  `created_by` bigint(20) NOT NULL DEFAULT '0',
  `created_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `modified_by` bigint(20) NOT NULL DEFAULT '0',
  `modified_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `locked_by` bigint(20) NOT NULL DEFAULT '0',
  `locked_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`spsoccer_vanue_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
