ADD possibilité de cacher les infos bulles
[euphorik.git] / modules / include / euphorik_bd.hrl
1 % Copyright 2008 Grégory Burri\r
2 %\r
3 % This file is part of Euphorik.\r
4 %\r
5 % Euphorik is free software: you can redistribute it and/or modify\r
6 % it under the terms of the GNU General Public License as published by\r
7 % the Free Software Foundation, either version 3 of the License, or\r
8 % (at your option) any later version.\r
9 %\r
10 % Euphorik is distributed in the hope that it will be useful,\r
11 % but WITHOUT ANY WARRANTY; without even the implied warranty of\r
12 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
13 % GNU General Public License for more details.\r
14 %\r
15 % You should have received a copy of the GNU General Public License\r
16 % along with Euphorik.  If not, see <http://www.gnu.org/licenses/>.\r
17 %\r
18 % @author GBurri\r
19
20
21 % Pour générer des id\r
22 -record(counter,\r
23    {\r
24       key,\r
25       value\r
26    }).\r
27    \r
28 \r
29 % décrit un enregistrement d'un message\r
30 -record(minichat,
31    {\r
32       id, % integer\r
33       auteur_id, % -> #user.id
34       date, % erlang:now()
35       pseudo, % chaine de caractère
36       contenu, % chaine de caractère
37       troll_id = undefined % l'id du troll associé correspondant
38    }).\r
39    
40    \r
41 % type bag\r
42 % 'repondant' repond à 'cible'\r
43 -record(reponse_minichat,\r
44    {\r
45       repondant, % -> #minichat.id\r
46       cible % -> #minichat.id\r
47    }). \r
48
49 \r
50 -record(user,\r
51    {\r
52       id,\r
53       cookie, % string()\r
54       pseudo = [], % string()
55       login = [], % string()
56       password = [], % string() (md5)
57       email = [], % string()\r
58       date_creation, % erlang:now()\r
59       date_derniere_connexion, % erlang:now(), est mis à jour lors de n'importe quelle activitée (envoie de message par exemple)\r
60       css = [], % string()
61       nick_format = nick, %atom(), peut valoir 'nick', 'login' ou 'nick_login'
62       view_times = true,
63       view_tooltips = true,
64       indice_flood = 0, % integer() est incrémenté lorsque l'utilisateur envoie trop rapidement des messages.
65       page_principale = 1, % la page de la conversation principale
66       conversations = [], % [{integer(), integer()}], la liste des messages correspondant au conversation ainsi que la page affichée
67       ek_master = false,
68       last_ip = undefined % integer(), undefined si inconnu\r
69    }).
70
71
72 % identificateur : (ip)
73 -record(ip_table,
74    {
75       ip, % {integer(), integer(), integer(), integer()}
76       ban = undefined, % la date du dernier bannissement
77       ban_duration = 0, % le temps de ban en minute
78       nb_try_register = 0,
79       nb_try_login = 0, % pour l'instant pas utilisé
80       date_last_try_register,
81       date_last_try_login % pour l'instant pas utilisé
82    }).
83    
84    
85 -record(troll,
86    {
87       id,
88       id_user,
89       date_create, % erlang:now()
90       date_post = undefined, % date à laquelle le troll est affiché sur la page principale. undefined initialement puis erlang:now() quand affiché
91       content % chaine de caractère
92    }).
93