-
Notifications
You must be signed in to change notification settings - Fork 17
/
laclef_webapp.sql
159 lines (127 loc) · 4.05 KB
/
laclef_webapp.sql
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
-- laclef-webapp SQL Dump
--
-- Serveur: laclef.cc
-- Généré le : Lundi 02 Décembre 2013 à 13:00
-- Version du serveur: 5.1.72
-- Version de PHP: 5.3.3-7+squeeze17
--
-- --------------------------------------------------------
--
-- Structure de la table `equipments`
--
CREATE TABLE IF NOT EXISTS `equipments` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uid` char(7) DEFAULT NULL,
`name` varchar(48) NOT NULL,
`description` varchar(256) NOT NULL,
`hirer` varchar(32) DEFAULT NULL,
`start` date DEFAULT NULL,
`end` date DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Structure de la table `messages`
--
CREATE TABLE IF NOT EXISTS `messages` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uid` varchar(32) NOT NULL,
`timestamp` datetime NOT NULL,
`message` varchar(160) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=15 DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Structure de la table `orders`
--
CREATE TABLE IF NOT EXISTS `orders` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`swipe` int(11) NOT NULL,
`snack` int(11) NOT NULL,
`quantity` smallint(5) unsigned NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=31358 DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Structure de la table `payments`
--
CREATE TABLE IF NOT EXISTS `payments` (
`uid` varchar(32) NOT NULL,
`amount` float NOT NULL,
`timestamp` datetime NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Structure de la table `permissions`
--
CREATE TABLE IF NOT EXISTS `permissions` (
`uid` varchar(32) NOT NULL,
`id` int(11) NOT NULL,
`end` datetime DEFAULT NULL,
PRIMARY KEY (`uid`,`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Structure de la table `readers`
--
CREATE TABLE IF NOT EXISTS `readers` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`location` varchar(128) DEFAULT NULL,
`services` varchar(24) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Structure de la table `snacks`
--
CREATE TABLE IF NOT EXISTS `snacks` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`description_fr_FR` varchar(128) NOT NULL,
`description_en_US` varchar(128) NOT NULL,
`price` float NOT NULL,
`visible` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=30 DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Structure de la table `swipes`
--
CREATE TABLE IF NOT EXISTS `swipes` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`timestamp` datetime NOT NULL,
`reader` int(11) NOT NULL,
`uid` varchar(32) NOT NULL,
`service` smallint(6) NOT NULL,
`status` smallint(6) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=31841 DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Structure de la table `tags`
--
CREATE TABLE IF NOT EXISTS `tags` (
`uid` char(8) NOT NULL,
`owner` varchar(32) NOT NULL DEFAULT '',
`keya` char(6) DEFAULT NULL,
`type` tinyint(4) NOT NULL DEFAULT '0',
PRIMARY KEY (`uid`,`owner`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Structure de la table `users`
--
CREATE TABLE IF NOT EXISTS `users` (
`uid` varchar(32) NOT NULL,
`firstname` varchar(32) DEFAULT NULL,
`lastname` varchar(32) DEFAULT NULL,
`email` varchar(64) DEFAULT NULL,
`password` varchar(64) DEFAULT NULL,
`admin` tinyint(1) NOT NULL DEFAULT '0',
`locale` char(5) NOT NULL DEFAULT 'en_US',
`balance` float NOT NULL,
PRIMARY KEY (`uid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Contenu de la table `users`
--
INSERT INTO `users` VALUES ('admin', 'Administrateur', '', 'admin@localhost', 'd033e22ae348aeb5660fc2140aec35850c4da997', 1, 'fr_FR', 0);