1-- ========================================================================
2-- Copyright (C) 2005      Rodolphe Quiedeville <rodolphe@quiedeville.org>
3-- Copyright (C) 2005-2012 Regis Houssin        <regis.houssin@inodbox.com>
4--
5-- This program 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.
9--
10-- This program 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.
14--
15-- You should have received a copy of the GNU General Public License
16-- along with this program. If not, see <https://www.gnu.org/licenses/>.
17--
18-- ========================================================================
19
20
21-- redaction : 0
22-- valide    : 1
23-- approuve  : 2
24-- envoye    : 3
25
26create table llx_mailing
27(
28  rowid				integer AUTO_INCREMENT PRIMARY KEY,
29  statut			smallint       DEFAULT 0,            --
30  titre				varchar(128),                        -- Ref of mailing
31  entity			integer DEFAULT 1 NOT NULL,	         -- multi company id
32  sujet				varchar(128),                        -- Sujet of mailing
33  body				mediumtext,
34  bgcolor			varchar(8),                          -- Backgroud color of mailing
35  bgimage			varchar(255),                        -- Backgroud image of mailing
36  cible				varchar(60),
37  nbemail			integer,
38  email_from		varchar(160),                        -- Email address of sender
39  email_replyto		varchar(160),                        -- Email address for reply
40  email_errorsto	varchar(160),                        -- Email addresse for errors
41  tag				varchar(128) NULL,
42  date_creat		datetime,                            -- creation date
43  date_valid		datetime,                            --
44  date_appro		datetime,                            --
45  date_envoi		datetime,                            -- date d'envoi
46  tms				timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
47  fk_user_creat		integer,                             -- user creator
48  fk_user_valid		integer,                             -- user validator
49  fk_user_appro		integer,                             -- not used
50  extraparams		varchar(255),						 -- for stock other parameters with json format
51  joined_file1		varchar(255),
52  joined_file2		varchar(255),
53  joined_file3		varchar(255),
54  joined_file4		varchar(255)
55)ENGINE=innodb;
56