X-Git-Url: http://git.euphorik.ch/?p=euphorik.git;a=blobdiff_plain;f=modules%2Finclude%2Feuphorik_bd.hrl;h=d7cdd8a365fb4597ef0ec6b0f8ca84282f5f9c71;hp=7ffeae4073ea0c21453507f9ac8042c61e2c08a0;hb=64ef87442b933d47f4dbc9dfec9a5a16e522c375;hpb=6feaef2a51f7226c41d69f9e86f605718b78aa02 diff --git a/modules/include/euphorik_bd.hrl b/modules/include/euphorik_bd.hrl index 7ffeae4..d7cdd8a 100755 --- a/modules/include/euphorik_bd.hrl +++ b/modules/include/euphorik_bd.hrl @@ -1,5 +1,26 @@ -% Auteur : GBurri -% Version 2 +% Copyright 2008 Grégory Burri +% +% This file is part of Euphorik. +% +% Euphorik is free software: you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation, either version 3 of the License, or +% (at your option) any later version. +% +% Euphorik is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with Euphorik. If not, see . +% +% @author GBurri + + +% Version de la BD +-define(VERSION_BD, 1). + % Pour générer des id -record(counter, @@ -7,15 +28,25 @@ key, value }). + + +% Mémorse toutes les propriétés, entre autre la version des données +-record(proprietes, + { + nom, + valeur + }). + % décrit un enregistrement d'un message -record(minichat, { id, % integer - auteur_id, % -> user.id + auteur_id, % -> #user.id date, % erlang:now() pseudo, % chaine de caractère - contenu % chaine de caractère + contenu, % chaine de caractère + troll_id = undefined % l'id du troll associé correspondant }). @@ -23,8 +54,8 @@ % 'repondant' repond à 'cible' -record(reponse_minichat, { - repondant, % -> minichat.id - cible % -> minichat.id + repondant, % -> #minichat.id + cible % -> #minichat.id }). @@ -39,7 +70,36 @@ date_creation, % erlang:now() date_derniere_connexion, % erlang:now(), est mis à jour lors de n'importe quelle activitée (envoie de message par exemple) css = [], % string() - indice_flood = 0 % integer() est incrémenté lorsque l'utilisateur envoie trop rapidement des messages. - }). + nick_format = nick, %atom(), peut valoir 'nick', 'login' ou 'nick_login' + view_times = true, + view_tooltips = true, + indice_flood = 0, % integer() est incrémenté lorsque l'utilisateur envoie trop rapidement des messages. + page_principale = 1, % la page de la conversation principale + conversations = [], % [{integer(), integer()}], la liste des messages correspondant au conversation ainsi que la page affichée + ek_master = false, + last_ip = undefined % integer(), undefined si inconnu + }). + + +% identificateur : (ip) +-record(ip_table, + { + ip, % {integer(), integer(), integer(), integer()} + ban = undefined, % la date du dernier bannissement + ban_duration = 0, % le temps de ban en minute + nb_try_register = 0, + nb_try_login = 0, % pour l'instant pas utilisé + date_last_try_register, + date_last_try_login % pour l'instant pas utilisé + }). + +-record(troll, + { + id, + id_user, + date_create, % erlang:now() + date_post = undefined, % date à laquelle le troll est affiché sur la page principale. undefined initialement puis erlang:now() quand affiché + content % chaine de caractère + }). \ No newline at end of file