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

START TRANSACTION;



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

--
-- Table structure for table `categories`
--

CREATE TABLE `categories` (
  `CAT_ID` int(11) NOT NULL,
  `EN_CAT_NAME` varchar(300) NOT NULL,
  `LUG_CAT_NAME` varchar(300) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `categories`
--

INSERT INTO `categories` (`CAT_ID`, `EN_CAT_NAME`, `LUG_CAT_NAME`) VALUES
(1, 'Action', 'Action'),
(2, 'Adventure\r\n', 'Adventure'),
(4, 'Science fiction', 'Science fiction'),
(5, 'Cartoon', 'Cartoon'),
(6, 'Love story', 'Love story'),
(7, 'Family', 'Family'),
(8, 'Ugandan', 'Ugandan'),
(9, 'Nigerian', 'Nigerian'),
(10, 'High School', 'High School'),
(11, 'Horror', 'Horror');

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

--
-- Table structure for table `episode_bitrates`
--

CREATE TABLE `episode_bitrates` (
  `BITRATE_ID` int(11) NOT NULL,
  `BITRATE` varchar(300) NOT NULL,
  `BITRATE_VIDEO` varchar(3000) NOT NULL,
  `BITRATE_WIDTH` int(100) NOT NULL,
  `BITRATE_HEIGHT` int(100) NOT NULL,
  `BITRATE_DURATION` double NOT NULL,
  `MOV_ID` int(11) NOT NULL,
  `EPSD_ID` int(11) NOT NULL,
  `TRANSCODED` tinyint(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `genres`
--

CREATE TABLE `genres` (
  `GENRE_ID` int(11) NOT NULL,
  `GENRE_NAME` varchar(300) NOT NULL,
  `GENRE_KEY` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `genres`
--

INSERT INTO `genres` (`GENRE_ID`, `GENRE_NAME`, `GENRE_KEY`) VALUES
(1, 'Series', 'SEPSD'),
(2, 'Full movie', 'FUMOV');

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

--
-- Table structure for table `movies`
--

CREATE TABLE `movies` (
  `MOV_ID` int(11) NOT NULL,
  `MOV_TITLE` varchar(3000) NOT NULL,
  `MOVIE_PROGRESS_FILE` varchar(3000) NOT NULL,
  `MOVIE_FILE` varchar(3000) NOT NULL,
  `MOV_POSTER` varchar(500) NOT NULL,
  `MOV_TRAILER` varchar(500) NOT NULL,
  `THUMBNAIL_POSTER` varchar(500) NOT NULL,
  `GIF_PREVIEW` varchar(500) NOT NULL,
  `MOV_DESCRIPTION` varchar(500) NOT NULL,
  `ADMIN_ID` int(11) NOT NULL,
  `VJ_ID` int(11) NOT NULL,
  `CAT_ID` int(11) NOT NULL,
  `GENRE_ID` int(11) NOT NULL,
  `RELEASE_DATE` varchar(255) NOT NULL,
  `HAS_SUB_TITLES` tinyint(1) NOT NULL,
  `SUB_TITLE_LANGUAGE` varchar(500) NOT NULL,
  `IS_FREE` tinyint(1) NOT NULL,
  `NARRATED_FROM` int(11) NOT NULL,
  `NARRATED_TO` int(11) NOT NULL,
  `ADD_ADS` tinyint(1) NOT NULL,
  `MOV_NO` varchar(255) NOT NULL,
  `QUALITY_SPLIT` tinyint(1) NOT NULL,
  `QUALITY_SPLITTED` tinyint(1) NOT NULL,
  `UPLOADED` tinyint(1) NOT NULL,
  `UPLOAD_FOLDER` varchar(255) NOT NULL,
  `CREATED` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `PUBLISH_MOV` tinyint(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `movies`
--

INSERT INTO `movies` (`MOV_ID`, `MOV_TITLE`, `MOVIE_PROGRESS_FILE`, `MOVIE_FILE`, `MOV_POSTER`, `MOV_TRAILER`, `THUMBNAIL_POSTER`, `GIF_PREVIEW`, `MOV_DESCRIPTION`, `ADMIN_ID`, `VJ_ID`, `CAT_ID`, `GENRE_ID`, `RELEASE_DATE`, `HAS_SUB_TITLES`, `SUB_TITLE_LANGUAGE`, `IS_FREE`, `NARRATED_FROM`, `NARRATED_TO`, `ADD_ADS`, `MOV_NO`, `QUALITY_SPLIT`, `QUALITY_SPLITTED`, `UPLOADED`, `UPLOAD_FOLDER`, `CREATED`, `PUBLISH_MOV`) VALUES
(34, 'y2mate.com - Doja Cat  Vegas From the Original Motion Picture Soundtrack ELVIS Official Video_1080p', 'progress_619483.json', '1080p_video.mp4', 'thumbnail-656r5_2eea28c1dcb49862c6f81bc26d0f98ee.png', '', 'thumbnail.jpg', 'preview.gif', 'sefefrgfsdg', 1, 8, 8, 2, '09/13/2022', 0, '', 0, 5, 7, 1, 'MOV552622', 0, 0, 1, 'dir552622', '2022-09-24 20:21:14', 1),
(35, 'Olivia Rodrigo - brutal (from _driving home 2 u_)(720P_HD)', 'progress_691680.json', '720p_video.mp4', 'thumbnail-656r5_eca2cda58d75af6a20dc184463453d93.png', '', 'thumbnail.jpg', 'preview.gif', 'te5tw5twet', 1, 8, 1, 2, '09/14/2022', 0, '', 0, 5, 7, 1, 'MOV372316', 0, 0, 1, 'dir372316', '2022-09-24 20:52:53', 1),
(36, 'YG_ Tyga_ 21 Savage - Run ft. BIA(480P)', 'progress_384870.json', '480p_video.mp4', 'thumbnail-656r5_56bcb325725ec45d102443c217634c6b.png', '', 'thumbnail.jpg', 'preview.gif', 'gdfgdfgdf', 1, 8, 1, 2, '09/14/2022', 0, '', 0, 5, 7, 1, 'MOV565707', 1, 0, 1, 'dir565707', '2022-09-24 20:54:57', 0);

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

--
-- Table structure for table `movie_bitrates`
--

CREATE TABLE `movie_bitrates` (
  `BITRATE_ID` int(11) NOT NULL,
  `BITRATE` varchar(300) NOT NULL,
  `BITRATE_VIDEO` varchar(3000) NOT NULL,
  `BITRATE_WIDTH` int(100) NOT NULL,
  `BITRATE_HEIGHT` int(100) NOT NULL,
  `BITRATE_DURATION` double NOT NULL,
  `MOV_ID` int(11) NOT NULL,
  `TRANSCODED` tinyint(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `movie_bitrates`
--

INSERT INTO `movie_bitrates` (`BITRATE_ID`, `BITRATE`, `BITRATE_VIDEO`, `BITRATE_WIDTH`, `BITRATE_HEIGHT`, `BITRATE_DURATION`, `MOV_ID`, `TRANSCODED`) VALUES
(109, '1080p', '1080p_video.mp4', 1920, 1080, 202.455, 34, 1),
(110, '720p', '720p_video.mp4', 1280, 720, 143.685208, 35, 1),
(111, '480p', '480p_video.mp4', 854, 480, 291.272, 36, 1),
(112, '360p', '360p_video.mp4', 640, 360, 291.272, 36, 0),
(113, '240p', '240p_video.mp4', 426, 240, 291.272, 36, 0),
(114, '144p', '144p_video.mp4', 256, 144, 291.272, 36, 0);

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

--
-- Table structure for table `narration_languages`
--

CREATE TABLE `narration_languages` (
  `LANG_ID` int(11) NOT NULL,
  `LANG_NAME` varchar(300) NOT NULL,
  `IS_USED` tinyint(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `narration_languages`
--

INSERT INTO `narration_languages` (`LANG_ID`, `LANG_NAME`, `IS_USED`) VALUES
(1, 'Luganda', 1),
(2, 'Lusoga', 1),
(3, 'Runyankole', 1),
(4, 'Runyakitara', 1),
(5, 'English', 1),
(7, 'No translation', 1);

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

--
-- Table structure for table `pakages`
--

CREATE TABLE `pakages` (
  `PKG_ID` int(11) NOT NULL,
  `PKG_NAME` varchar(255) NOT NULL,
  `PKG_FEATURES` varchar(5000) NOT NULL,
  `PKG_BILLED` varchar(255) NOT NULL,
  `PRICE` double NOT NULL,
  `USE_PKG` tinyint(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `pakages`
--

INSERT INTO `pakages` (`PKG_ID`, `PKG_NAME`, `PKG_FEATURES`, `PKG_BILLED`, `PRICE`, `USE_PKG`) VALUES
(1, '1 day', 'Watch Premium movies; No Ads', 'DAILY', 1000, 1),
(2, '1 week', 'Watch Premium movies; Unlimited Download; No Ads', 'WEEKLY', 2000, 1),
(3, '1 month', 'Watch Premium movies; Unlimited Download; No Ads', 'MONTHLY', 20000, 1);

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

--
-- Table structure for table `payment_methods`
--

CREATE TABLE `payment_methods` (
  `PAYMENT_ID` int(11) NOT NULL,
  `PAYMENT_NAME` varchar(255) NOT NULL,
  `SCREEN_SHOT` varchar(255) NOT NULL,
  `USE_PAYMENT` tinyint(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `payment_methods`
--

INSERT INTO `payment_methods` (`PAYMENT_ID`, `PAYMENT_NAME`, `SCREEN_SHOT`, `USE_PAYMENT`) VALUES
(1, 'Airtel', 'AIRTEL_CARD.png', 1),
(2, 'MTN', 'MTN_CARD.png', 1),
(3, 'VISA/Matercard', 'VISA_CARD.png', 1);

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

--
-- Table structure for table `series_episodes`
--

CREATE TABLE `series_episodes` (
  `EPSD_ID` int(11) NOT NULL,
  `EPSD_TITLE` varchar(3000) NOT NULL,
  `EPSD_PROGRESS_FILE` varchar(3000) NOT NULL,
  `EPSD_FILE` varchar(3000) NOT NULL,
  `SEASON_NO` int(25) NOT NULL,
  `EPSD_NO` int(11) NOT NULL,
  `MOV_ID` int(25) NOT NULL,
  `EPSD_GIF_PREVIEW` varchar(500) NOT NULL,
  `EPSD_POSTER` varchar(500) NOT NULL,
  `EPSD_TRAILER` varchar(500) NOT NULL,
  `EPSD_THUMBNAIL` varchar(3000) NOT NULL,
  `EPSD_DESCRIPTION` varchar(500) NOT NULL,
  `QUALITY_SPLIT` tinyint(1) NOT NULL,
  `QUALITY_SPLITTED` tinyint(1) NOT NULL,
  `UPLOADED` tinyint(1) NOT NULL,
  `IS_FREE` tinyint(1) NOT NULL,
  `ADD_ADS` tinyint(1) NOT NULL,
  `PUBLISH_EPSD` tinyint(1) NOT NULL,
  `RELEASE_DATE` varchar(255) NOT NULL,
  `CREATED` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `subscriptions`
--

CREATE TABLE `subscriptions` (
  `SUB_ID` int(11) NOT NULL,
  `USER_ID` int(11) NOT NULL,
  `PKG_ID` int(11) NOT NULL,
  `SUB_DATE_TIME` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `PAYMENT_NO` varchar(255) NOT NULL,
  `PAYMENT_ID` int(11) NOT NULL,
  `PAID` tinyint(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `subscriptions`
--

INSERT INTO `subscriptions` (`SUB_ID`, `USER_ID`, `PKG_ID`, `SUB_DATE_TIME`, `PAYMENT_NO`, `PAYMENT_ID`, `PAID`) VALUES
(6, 5, 3, '2021-02-28 21:00:06', 'NO675438', 1, 1),
(7, 5, 1, '2021-02-04 17:55:43', 'NO879866', 1, 1);

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

--
-- Table structure for table `vjs`
--

CREATE TABLE `vjs` (
  `VJ_ID` int(11) NOT NULL,
  `VJ_NAME` varchar(500) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `vjs`
--

INSERT INTO `vjs` (`VJ_ID`, `VJ_NAME`) VALUES
(1, 'junior'),
(2, 'jingo'),
(3, 'mark'),
(4, 'kiwaa'),
(5, 'kevo'),
(6, 'iceP'),
(7, 'summy'),
(8, 'NONE'),
(9, 'Chris sweet');

--
-- Indexes for table `categories`
--
ALTER TABLE `categories`
  ADD PRIMARY KEY (`CAT_ID`);

--
-- Indexes for table `episode_bitrates`
--
ALTER TABLE `episode_bitrates`
  ADD PRIMARY KEY (`BITRATE_ID`);

--
-- Indexes for table `genres`
--
ALTER TABLE `genres`
  ADD PRIMARY KEY (`GENRE_ID`);

--
-- Indexes for table `movies`
--
ALTER TABLE `movies`
  ADD PRIMARY KEY (`MOV_ID`);

--
-- Indexes for table `movie_bitrates`
--
ALTER TABLE `movie_bitrates`
  ADD PRIMARY KEY (`BITRATE_ID`);

--
-- Indexes for table `narration_languages`
--
ALTER TABLE `narration_languages`
  ADD PRIMARY KEY (`LANG_ID`);

--
-- Indexes for table `pakages`
--
ALTER TABLE `pakages`
  ADD PRIMARY KEY (`PKG_ID`);

--
-- Indexes for table `payment_methods`
--
ALTER TABLE `payment_methods`
  ADD PRIMARY KEY (`PAYMENT_ID`);

--
-- Indexes for table `series_episodes`
--
ALTER TABLE `series_episodes`
  ADD PRIMARY KEY (`EPSD_ID`);

--
-- Indexes for table `subscriptions`
--
ALTER TABLE `subscriptions`
  ADD PRIMARY KEY (`SUB_ID`);

--
-- Indexes for table `vjs`
--
ALTER TABLE `vjs`
  ADD PRIMARY KEY (`VJ_ID`);

--
-- AUTO_INCREMENT for table `categories`
--
ALTER TABLE `categories`
  MODIFY `CAT_ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;

--
-- AUTO_INCREMENT for table `episode_bitrates`
--
ALTER TABLE `episode_bitrates`
  MODIFY `BITRATE_ID` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `genres`
--
ALTER TABLE `genres`
  MODIFY `GENRE_ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `movies`
--
ALTER TABLE `movies`
  MODIFY `MOV_ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=37;

--
-- AUTO_INCREMENT for table `movie_bitrates`
--
ALTER TABLE `movie_bitrates`
  MODIFY `BITRATE_ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=115;

--
-- AUTO_INCREMENT for table `narration_languages`
--
ALTER TABLE `narration_languages`
  MODIFY `LANG_ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `pakages`
--
ALTER TABLE `pakages`
  MODIFY `PKG_ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `payment_methods`
--
ALTER TABLE `payment_methods`
  MODIFY `PAYMENT_ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `series_episodes`
--
ALTER TABLE `series_episodes`
  MODIFY `EPSD_ID` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `subscriptions`
--
ALTER TABLE `subscriptions`
  MODIFY `SUB_ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `vjs`
--
ALTER TABLE `vjs`
  MODIFY `VJ_ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;
COMMIT;

