Вы находитесь на странице: 1из 5

---------

phpMyAdmin SQL Dump version 3.2.2.1deb1 http://www.phpmyadmin.net Host: localhost Generation Time: Sep 22, 2011 at 04:50 PM Server version: 5.1.49 PHP Version: 5.3.3-1ubuntu9.5

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 /*!40101 /*!40101 /*!40101 SET SET SET SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; NAMES utf8 */;

--- Database: `lawschool` --- ---------------------------------------------------------- Table structure for table `comments` -CREATE TABLE IF NOT EXISTS `comments` ( `id` int(40) NOT NULL, `user_id` int(40) NOT NULL, `notes_id` int(40) NOT NULL, `comment` text NOT NULL, `recommend` int(40) NOT NULL, `abuse` int(40) NOT NULL, `abuse_text` int(11) NOT NULL, `status` int(7) NOT NULL DEFAULT '0' COMMENT '0=>pending,1=>active,2=>deactive ', `posted_on` datetime NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; --- Dumping data for table `comments` --- ---------------------------------------------------------- Table structure for table `course` -CREATE TABLE IF NOT EXISTS `course` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(100) NOT NULL, `status` int(4) NOT NULL DEFAULT '0' COMMENT '0=>pending,1=>active,2=>deactive ', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; --

-- Dumping data for table `course` --- ---------------------------------------------------------- Table structure for table `notes` -CREATE TABLE IF NOT EXISTS `notes` ( `id` int(40) NOT NULL AUTO_INCREMENT, `user_id` int(40) DEFAULT NULL, `notes_name` varchar(100) DEFAULT NULL, `notes_file` varchar(100) DEFAULT NULL, `notes_desc` text, `notes_state` varchar(100) DEFAULT NULL, `notes_school` varchar(100) DEFAULT NULL, `notes_rating` float(10,2) DEFAULT NULL, `notes_price` double(65,2) NOT NULL, `no_of_view` int(40) NOT NULL, `course` varchar(100) DEFAULT NULL, `professor` varchar(100) DEFAULT NULL, `paypal_email` varchar(100) DEFAULT NULL, `status` int(5) NOT NULL DEFAULT '0' COMMENT 'Status of uploaded document 0=>p ending,1=>Approved,2=>rejected', `created_on` datetime DEFAULT NULL, `updated_on` datetime DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ; --- Dumping data for table `notes` -INSERT INTO `notes` (`id`, `user_id`, `notes_name`, `notes_file`, `notes_desc`, `notes_state`, `notes_school`, `notes_rating`, `notes_price`, `no_of_view`, `cou rse`, `professor`, `paypal_email`, `status`, `created_on`, `updated_on`) VALUES (1, 0, '', '', '', '', '', 11.11, 0.00, 0, '', '', '', 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00'), (2, NULL, NULL, NULL, NULL, NULL, NULL, 1111.00, 0.00, 0, NULL, NULL, NULL, 0, N ULL, NULL); -- ---------------------------------------------------------- Table structure for table `order` -CREATE TABLE IF NOT EXISTS `order` ( `id` int(40) NOT NULL AUTO_INCREMENT, `note_id` int(40) NOT NULL, `user_id` int(40) NOT NULL, `quantity` int(10) NOT NULL, `purchase_price` double(65,2) NOT NULL, `tax` double(65,2) DEFAULT NULL, `purchased_on` datetime NOT NULL, `status` int(5) NOT NULL COMMENT '0=> payment Due, 1=> payment in process,2=>p ayment Complete,3=>Payment failed,', `paypal_id` varchar(100) NOT NULL,

PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; --- Dumping data for table `order` --- ---------------------------------------------------------- Table structure for table `ratings` -CREATE TABLE IF NOT EXISTS `ratings` ( `id` int(40) NOT NULL AUTO_INCREMENT, `user_id` int(40) DEFAULT NULL, `easiness` int(7) NOT NULL, `helpfulness` int(7) NOT NULL, `clarity` int(7) NOT NULL, `interest_level` int(7) NOT NULL, `comment` text NOT NULL, `created_on` datetime NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; --- Dumping data for table `ratings` --- ---------------------------------------------------------- Table structure for table `schools` -CREATE TABLE IF NOT EXISTS `schools` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(100) NOT NULL, `state_id` int(10) NOT NULL, `status` int(4) NOT NULL DEFAULT '0' COMMENT '0=>pending,1=>active,2=>deactive ', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; --- Dumping data for table `schools` --- ---------------------------------------------------------- Table structure for table `states` -CREATE TABLE IF NOT EXISTS `states` ( `id` int(10) NOT NULL AUTO_INCREMENT, `name` varchar(100) NOT NULL,

PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; --- Dumping data for table `states` --- ---------------------------------------------------------- Table structure for table `users` -CREATE TABLE IF NOT EXISTS `users` ( `id` int(20) NOT NULL AUTO_INCREMENT, `type` int(20) DEFAULT NULL COMMENT '0=>student,1=>teacher', `full_name` varchar(80) DEFAULT NULL, `email` varchar(100) DEFAULT NULL, `phone_number` varchar(100) DEFAULT NULL, `mobile` varchar(40) DEFAULT NULL, `password` varchar(100) NOT NULL, `token` varchar(100) NOT NULL, `state_id` int(20) NOT NULL, `school` varchar(100) NOT NULL, `department` varchar(100) NOT NULL, `isAdmin` int(4) NOT NULL DEFAULT '0', `status` int(4) NOT NULL DEFAULT '0' COMMENT '0=>pending,1=>active,2=>deactive ', `created_on` datetime DEFAULT NULL, `updated_on` datetime DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; --- Dumping data for table `users` --- ---------------------------------------------------------- Table structure for table `user_earnings` -CREATE TABLE IF NOT EXISTS `user_earnings` ( `id` int(11) NOT NULL AUTO_INCREMENT, `order_id` int(40) NOT NULL, `user_id` int(40) NOT NULL, `note_id` int(40) NOT NULL, `initial_price` double(65,2) NOT NULL, `selling _price` double(65,2) NOT NULL, `amount_earned` double(65,2) NOT NULL, `created_on` datetime NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; --- Dumping data for table `user_earnings` --

Вам также может понравиться