1 % Copyright 2008 Grégory Burri
3 % This file is part of Euphorik.
5 % Euphorik is free software: you can redistribute it and/or modify
6 % it under the terms of the GNU General Public License as published by
7 % the Free Software Foundation, either version 3 of the License, or
8 % (at your option) any later version.
10 % Euphorik is distributed in the hope that it will be useful,
11 % but WITHOUT ANY WARRANTY; without even the implied warranty of
12 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 % GNU General Public License for more details.
15 % You should have received a copy of the GNU General Public License
16 % along with Euphorik. If not, see <http://www.gnu.org/licenses/>.
22 -define(VERSION_BD, 2).
23 -define(TABLES, [counter, proprietes, minichat, reponse_minichat, user, ip_table, troll]).
34 % Mémorse toutes les propriétés, entre autre la version des données
42 % décrit un enregistrement d'un message
46 auteur_id, % -> #user.id
48 pseudo, % chaine de caractère
49 contenu, % chaine de caractère
50 troll_id = undefined, % l'id du troll associé correspondant
51 racine_id = undefined % la racine, par défaut correspond à l'id du message
56 % 'repondant' repond à 'cible'
57 -record(reponse_minichat,
59 repondant, % -> #minichat.id
60 cible % -> #minichat.id
65 -record(profile, % attention : pas une table !
67 pseudo = [], % string()
68 email = [], % string()
70 nick_format = nick, %atom(), peut valoir 'nick', 'login' ou 'nick_login'
73 ostentatious_master = light, % peut valoir invisible, light ou heavy. seulement pour ek_master
74 chat_order = reverse, % peut valoir chrono ou reverse
75 conversations = [] % [{integer(), bool}], la liste des messages correspondant au conversation {racine, reduite?}
81 login = [], % string()
82 password = [], % string() (md5)
84 date_creation, % erlang:now()
85 date_derniere_connexion, % erlang:now(), est mis à jour lors de n'importe quelle activitée (envoie de message par exemple)
86 indice_flood = 0, % integer() est incrémenté lorsque l'utilisateur envoie trop rapidement des messages.
88 last_ip = undefined % integer(), undefined si inconnu
92 % identificateur : (ip)
95 ip, % {integer(), integer(), integer(), integer()}
96 ban = undefined, % la date du dernier bannissement
97 ban_duration = 0, % le temps de ban en minute
99 nb_try_login = 0, % pour l'instant pas utilisé
100 date_last_try_register,
101 date_last_try_login % pour l'instant pas utilisé
109 date_create, % erlang:now()
110 date_post = undefined, % date à laquelle le troll est affiché sur la page principale. undefined initialement puis erlang:now() quand affiché
111 content % chaine de caractère