1-- ===================================================================
2-- Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3--
4-- This program is free software; you can redistribute it and/or modify
5-- it under the terms of the GNU General Public License as published by
6-- the Free Software Foundation; either version 3 of the License, or
7-- (at your option) any later version.
8--
9-- This program is distributed in the hope that it will be useful,
10-- but WITHOUT ANY WARRANTY; without even the implied warranty of
11-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12-- GNU General Public License for more details.
13--
14-- You should have received a copy of the GNU General Public License
15-- along with this program. If not, see <https://www.gnu.org/licenses/>.
16--
17-- Table with templates of emails
18-- ===================================================================
19
20create table llx_c_email_templates
21(
22  rowid           integer AUTO_INCREMENT PRIMARY KEY,
23  entity		  integer DEFAULT 1 NOT NULL,	  -- multi company id
24  module          varchar(32),                    -- Nom du module en rapport avec le modele
25  type_template   varchar(32),  				  -- template for which type of email (send invoice by email, send order, ...)
26  lang            varchar(6) DEFAULT '',		  -- We use a default to '' so the unique index that include this field will work
27  private         smallint DEFAULT 0 NOT NULL,    -- Template public or private
28  fk_user         integer,                        -- Id user owner if template is private, or null
29  datec           datetime,
30  tms             timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
31  label           varchar(180),					  -- Label of predefined email
32  position        smallint,					      -- Position
33  enabled         varchar(255) DEFAULT '1',		  -- Condition to have this module visible
34  active          tinyint DEFAULT 1  NOT NULL,
35  topic			  text,                           -- Predefined topic
36  joinfiles		  text,                           -- Files to attach
37  content         mediumtext,                     -- Predefined text
38  content_lines   text                            -- Predefined lines
39)ENGINE=innodb;
40