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

START TRANSACTION;



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

--
-- Table structure for table `artists`
--

CREATE TABLE `artists` (
  `artistid` int(11) NOT NULL,
  `artistname` varchar(255) NOT NULL,
  `bio` varchar(500) DEFAULT NULL,
  `facebook` varchar(255) DEFAULT NULL,
  `twitter` varchar(255) DEFAULT NULL,
  `instagram` varchar(255) DEFAULT NULL,
  `youtube` varchar(500) NOT NULL,
  `image_url` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `artists`
--

INSERT INTO `artists` (`artistid`, `artistname`, `bio`, `facebook`, `twitter`, `instagram`, `youtube`, `image_url`) VALUES
(1, 'ATIF ASLAM', 'ATIF IS A SINGER', 'HTTPS://WWW.GOOGLE.COM/SEARCH?Q=ATIF+MUSIC+SHOW+PR+IMAGES&TBM=ISCH&VED=2AHUKEWIK9PGSLZ3-AHX0RICCHWV_CYCQ2-CCEGQIABAA&OQ=ATIF+MUSIC+SHOW+PR+IMAGES&GS_LCP=CGNPBWCQA1DOCVIQF2DIGGGACAB4AIAB7AKIAYITKGEFMI00LJSYAQCGAQGQAQTND3MTD2L6LWLTZ8ABAQ&SCLIENT=IMG&EI=HOAY', 'HTTPS://WWW.GOOGLE.COM/SEARCH?Q=ATIF+MUSIC+SHOW+PR+IMAGES&TBM=ISCH&VED=2AHUKEWIK9PGSLZ3-AHX0RICCHWV_CYCQ2-CCEGQIABAA&OQ=ATIF+MUSIC+SHOW+PR+IMAGES&GS_LCP=CGNPBWCQA1DOCVIQF2DIGGGACAB4AIAB7AKIAYITKGEFMI00LJSYAQCGAQGQAQTND3MTD2L6LWLTZ8ABAQ&SCLIENT=IMG&EI=HOAY', 'HTTPS://WWW.GOOGLE.COM/SEARCH?Q=ATIF+MUSIC+SHOW+PR+IMAGES&TBM=ISCH&VED=2AHUKEWIK9PGSLZ3-AHX0RICCHWV_CYCQ2-CCEGQIABAA&OQ=ATIF+MUSIC+SHOW+PR+IMAGES&GS_LCP=CGNPBWCQA1DOCVIQF2DIGGGACAB4AIAB7AKIAYITKGEFMI00LJSYAQCGAQGQAQTND3MTD2L6LWLTZ8ABAQ&SCLIENT=IMG&EI=HOAY', 'HTTPS://WWW.GOOGLE.COM/SEARCH?Q=ATIF+MUSIC+SHOW+PR+IMAGES&TBM=ISCH&VED=2AHUKEWIK9PGSLZ3-AHX0RICCHWV_CYCQ2-CCEGQIABAA&OQ=ATIF+MUSIC+SHOW+PR+IMAGES&GS_LCP=CGNPBWCQA1DOCVIQF2DIGGGACAB4AIAB7AKIAYITKGEFMI00LJSYAQCGAQGQAQTND3MTD2L6LWLTZ8ABAQ&SCLIENT=IMG&EI=HOAYZIQIGFTDNSEP6_6NUAG&BIH=625&BIW=1366&RLZ=1C1SQJL_ENPK1040PK1040#IMGRC=LRFY1IFMFAAGGM', 'download.jpg');

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

--
-- Table structure for table `attendees`
--

CREATE TABLE `attendees` (
  `attendeeid` int(11) NOT NULL,
  `firstname` varchar(255) NOT NULL,
  `lastname` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `category`
--

CREATE TABLE `category` (
  `cid` int(11) NOT NULL,
  `ccode` varchar(200) NOT NULL,
  `categorytype` varchar(255) NOT NULL,
  `categorydes` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `category`
--

INSERT INTO `category` (`cid`, `ccode`, `categorytype`, `categorydes`) VALUES
(3, 'P1', 'POETRY', 'ONLY FOR POETRY PURPOSES');

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

--
-- Table structure for table `eventdetails`
--

CREATE TABLE `eventdetails` (
  `eventid` int(11) NOT NULL,
  `eventname` varchar(500) NOT NULL,
  `ccode` varchar(255) NOT NULL,
  `categorytype` varchar(255) NOT NULL,
  `stime` varchar(255) DEFAULT NULL,
  `edate` varchar(500) NOT NULL,
  `etime` varchar(255) DEFAULT NULL,
  `fee` varchar(255) DEFAULT NULL,
  `artistid` int(11) NOT NULL,
  `artistname` varchar(255) DEFAULT NULL,
  `venueid` int(11) NOT NULL,
  `capacity` varchar(255) DEFAULT NULL,
  `venuename` varchar(255) DEFAULT NULL,
  `iscancelled` varchar(255) DEFAULT NULL,
  `description` varchar(500) DEFAULT NULL,
  `isfeatured` varchar(255) DEFAULT NULL,
  `issoldout` varchar(255) DEFAULT NULL,
  `isfree` varchar(255) DEFAULT NULL,
  `promoid` int(11) NOT NULL,
  `promocode` varchar(500) NOT NULL,
  `discount` varchar(255) DEFAULT NULL,
  `expirydate` varchar(255) DEFAULT NULL,
  `eventstatus` varchar(500) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `eventdetails`
--

INSERT INTO `eventdetails` (`eventid`, `eventname`, `ccode`, `categorytype`, `stime`, `edate`, `etime`, `fee`, `artistid`, `artistname`, `venueid`, `capacity`, `venuename`, `iscancelled`, `description`, `isfeatured`, `issoldout`, `isfree`, `promoid`, `promocode`, `discount`, `expirydate`, `eventstatus`) VALUES
(1, 'ATIFASLAM1001', 'P1', 'POETRY', '08:04', '2023-04-28', '04:08', '2000', 1, 'ATIF ASLAM', 2, '1500', 'HOKEY STADIM', 'Postponed', 'BEST', 'MK', '-', '-', 2, 'ATIF101', '10', '2023-04-21', 'Approved');

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

--
-- Table structure for table `promotions`
--

CREATE TABLE `promotions` (
  `promoid` int(11) NOT NULL,
  `promocode` varchar(255) NOT NULL,
  `discount` varchar(255) DEFAULT NULL,
  `expirydate` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `promotions`
--

INSERT INTO `promotions` (`promoid`, `promocode`, `discount`, `expirydate`) VALUES
(2, 'ATIF101', '10', '2023-04-21');

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

--
-- Table structure for table `venues`
--

CREATE TABLE `venues` (
  `venueid` int(11) NOT NULL,
  `venuename` varchar(255) NOT NULL,
  `address` varchar(255) DEFAULT NULL,
  `capacity` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `venues`
--

INSERT INTO `venues` (`venueid`, `venuename`, `address`, `capacity`) VALUES
(2, 'HOKEY STADIM', 'LAHORE NEAR KALMA CHOCK', '1500');

--
-- Indexes for table `artists`
--
ALTER TABLE `artists`
  ADD PRIMARY KEY (`artistid`);

--
-- Indexes for table `attendees`
--
ALTER TABLE `attendees`
  ADD PRIMARY KEY (`attendeeid`);

--
-- Indexes for table `category`
--
ALTER TABLE `category`
  ADD PRIMARY KEY (`cid`);

--
-- Indexes for table `eventdetails`
--
ALTER TABLE `eventdetails`
  ADD PRIMARY KEY (`eventid`),
  ADD KEY `artistid` (`artistid`),
  ADD KEY `venueid` (`venueid`),
  ADD KEY `promoid` (`promoid`);

--
-- Indexes for table `promotions`
--
ALTER TABLE `promotions`
  ADD PRIMARY KEY (`promoid`);

--
-- Indexes for table `venues`
--
ALTER TABLE `venues`
  ADD PRIMARY KEY (`venueid`);

--
-- AUTO_INCREMENT for table `artists`
--
ALTER TABLE `artists`
  MODIFY `artistid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `attendees`
--
ALTER TABLE `attendees`
  MODIFY `attendeeid` int(11) NOT NULL AUTO_INCREMENT;

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

--
-- AUTO_INCREMENT for table `eventdetails`
--
ALTER TABLE `eventdetails`
  MODIFY `eventid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

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

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

--
-- Constraints for dumped tables
--

--
-- Constraints for table `eventdetails`
--
ALTER TABLE `eventdetails`
  ADD CONSTRAINT `eventdetails_ibfk_1` FOREIGN KEY (`artistid`) REFERENCES `artists` (`artistid`),
  ADD CONSTRAINT `eventdetails_ibfk_2` FOREIGN KEY (`venueid`) REFERENCES `venues` (`venueid`),
  ADD CONSTRAINT `eventdetails_ibfk_3` FOREIGN KEY (`promoid`) REFERENCES `promotions` (`promoid`);
COMMIT;

