-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlocation.sql
More file actions
183 lines (150 loc) · 4.4 KB
/
location.sql
File metadata and controls
183 lines (150 loc) · 4.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
-- phpMyAdmin SQL Dump
-- version 4.1.12
-- http://www.phpmyadmin.net
--
-- Client : localhost:8889
-- Généré le : Mar 03 Mars 2015 à 19:33
-- Version du serveur : 5.5.34
-- Version de PHP : 5.5.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Base de données : `location`
--
-- --------------------------------------------------------
--
-- Structure de la table `admin`
--
CREATE TABLE `admin` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`login` text NOT NULL,
`password` text NOT NULL,
`created_at` int(11) NOT NULL,
`disabled_at` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
--
-- Contenu de la table `admin`
--
INSERT INTO `admin` (`id`, `login`, `password`, `created_at`, `disabled_at`) VALUES
(1, 'alexandre', '60c6d277a8bd81de7fdde19201bf9c58a3df08f4', 1424616721, 0);
-- --------------------------------------------------------
--
-- Structure de la table `category`
--
CREATE TABLE `category` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(100) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=10 ;
--
-- Contenu de la table `category`
--
INSERT INTO `category` (`id`, `name`) VALUES
(4, 'Maison'),
(5, 'Transport'),
(6, 'Loisirs'),
(8, 'Multimédia'),
(9, 'Autres');
-- --------------------------------------------------------
--
-- Structure de la table `comment`
--
CREATE TABLE `comment` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_from` int(11) NOT NULL,
`id_to` int(11) NOT NULL,
`content` text NOT NULL,
`mark` int(1) NOT NULL,
`created_at` int(11) NOT NULL,
`disabled_at` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=9 ;
-- --------------------------------------------------------
--
-- Structure de la table `offer`
--
CREATE TABLE `offer` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_category` int(11) NOT NULL,
`id_user` int(11) NOT NULL,
`name` text NOT NULL,
`content` text NOT NULL,
`price_per_day` float NOT NULL,
`location` int(5) NOT NULL,
`created_at` int(11) NOT NULL,
`disabled_at` int(11) NOT NULL,
`availability` tinyint(1) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=20 ;
-- --------------------------------------------------------
--
-- Structure de la table `photo`
--
CREATE TABLE `photo` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_offer` int(11) NOT NULL,
`photo_name` text NOT NULL,
`created_at` int(11) NOT NULL,
`disabled_at` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=19 ;
-- --------------------------------------------------------
--
-- Structure de la table `reservation`
--
CREATE TABLE `reservation` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`status` int(1) NOT NULL,
`id_offer` int(11) NOT NULL,
`id_user` int(11) NOT NULL,
`date_start` int(11) NOT NULL,
`date_end` int(11) NOT NULL,
`commented` int(1) NOT NULL,
`created_at` int(11) NOT NULL,
`disabled_at` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=16 ;
-- --------------------------------------------------------
--
-- Structure de la table `sess_handler`
--
CREATE TABLE `sess_handler` (
`session_id` varchar(40) NOT NULL DEFAULT '',
`data` text,
`csrf` text,
`ip` varchar(40) DEFAULT NULL,
`agent` varchar(255) DEFAULT NULL,
`stamp` int(11) DEFAULT NULL,
PRIMARY KEY (`session_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Structure de la table `user`
--
CREATE TABLE `user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`email` varchar(50) NOT NULL,
`password` varchar(255) NOT NULL,
`firstname` varchar(50) NOT NULL,
`lastname` varchar(50) NOT NULL,
`address` varchar(255) NOT NULL,
`postal` varchar(10) NOT NULL,
`city` varchar(50) NOT NULL,
`country` varchar(50) NOT NULL,
`mark` int(1) NOT NULL,
`photo` varchar(100) NOT NULL,
`created_at` int(11) NOT NULL,
`disabled_at` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=19 ;
-- --------------------------------------------------------
--
-- Structure de la table `wish`
--
CREATE TABLE `wish` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_user` int(11) NOT NULL,
`id_offer` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;