2 % Copyright 2008 Grégory Burri
\r
4 % This file is part of Euphorik.
\r
6 % Euphorik is free software: you can redistribute it and/or modify
\r
7 % it under the terms of the GNU General Public License as published by
\r
8 % the Free Software Foundation, either version 3 of the License, or
\r
9 % (at your option) any later version.
\r
11 % Euphorik is distributed in the hope that it will be useful,
\r
12 % but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
13 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
14 % GNU General Public License for more details.
\r
16 % You should have received a copy of the GNU General Public License
\r
17 % along with Euphorik. If not, see <http://www.gnu.org/licenses/>.
\r
23 -define(VERSION_BD, 3).
\r
24 -define(TABLES, [counter, proprietes, minichat, reponse_minichat, user, ip_table, troll]).
\r
27 % Pour générer des id
\r
35 % Mémorse toutes les propriétés, entre autre la version des données
\r
43 % Contient tous les textes que peut envoyer le serveur vers client.
\r
51 % décrit un enregistrement d'un message
\r
55 auteur_id, % -> #user.id
\r
56 date, % erlang:timestamp()
\r
57 pseudo, % chaine de caractère
\r
58 contenu, % chaine de caractère
\r
59 racine_id = undefined, % la racine, par défaut correspond à l'id du message
\r
60 status = normal % can be equal to normal, censored or deleted
\r
65 % 'repondant' repond à 'cible'
\r
66 -record(reponse_minichat,
\r
68 repondant, % -> #minichat.id
\r
69 cible % -> #minichat.id
\r
73 -record(profile, % attention : pas une table !
\r
75 pseudo = [], % string()
\r
76 email = [], % string()
\r
77 css = [], % string()
\r
78 nick_format = nick, %atom(), peut valoir 'nick', 'login' ou 'nick_login'
\r
80 view_tooltips = true,
\r
81 ostentatious_master = light, % peut valoir invisible, light ou heavy. seulement pour ek_master
\r
82 chat_order = reverse, % peut valoir chrono ou reverse
\r
83 conversations = [] % [{integer(), bool}], la liste des messages correspondant au conversation {racine, reduite?}
\r
91 login = [], % string()
\r
92 password = [], % string() (md5)
\r
93 profile = #profile{},
\r
94 date_creation, % erlang:timestamp()
\r
95 date_derniere_connexion, % erlang:timestamp(), est mis à jour lors de n'importe quelle activitée (envoie de message par exemple)
\r
96 indice_flood = 0, % integer() est incrémenté lorsque l'utilisateur envoie trop rapidement des messages.
\r
98 last_ip = undefined % integer(), undefined si inconnu
\r
102 % identificateur : (ip)
\r
105 ip, % {integer(), integer(), integer(), integer()}
\r
106 ban = undefined, % la date du dernier bannissement
\r
107 ban_duration = 0, % le temps de ban en minute
\r
108 nb_try_register = 0,
\r
109 nb_try_login = 0, % pour l'instant pas utilisé
\r
110 date_last_try_register,
\r
111 date_last_try_login % pour l'instant pas utilisé
\r
119 id_minichat = undefined, % l'id du message associé
\r
120 date_create, % erlang:timestamp()
\r
121 date_post = undefined, % date à laquelle le troll est affiché sur la page principale. undefined initialement puis erlang:timestamp() quand affiché
\r
122 content % chaine de caractère
\r