1-- ===================================================================
2-- Copyright (C) 2001-2007 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
20create table llx_fichinter
21(
22  rowid				integer AUTO_INCREMENT PRIMARY KEY,
23  fk_soc			integer NOT NULL,
24  fk_projet			integer DEFAULT 0,          -- projet auquel est rattache la fiche
25  fk_contrat		integer DEFAULT 0,          -- contrat auquel est rattache la fiche
26  ref				varchar(30) NOT NULL,       -- number
27  ref_ext			varchar(255),
28  entity			integer DEFAULT 1 NOT NULL, -- multi company id
29  tms				timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
30  datec				datetime,                   -- date de creation
31  date_valid		datetime,                   -- date de validation
32  datei				date,						-- date de livraison du bon d'intervention
33  fk_user_author	integer,					-- user making creation
34  fk_user_modif     integer,                    -- user making last change
35  fk_user_valid		integer,                    -- user validating record
36  fk_statut			smallint  DEFAULT 0,
37  dateo				date,						-- date de début d'intervention
38  datee				date,						-- date de fin d'intervention
39  datet				date,						-- date de terminaison de l'intervention
40  duree				real,                       -- duree totale de l'intervention
41  description		text,
42  note_private		text,
43  note_public		text,
44  model_pdf			varchar(255),
45  last_main_doc		varchar(255),				-- relative filepath+filename of last main generated document
46  import_key        varchar(14),
47  extraparams		varchar(255)				-- for other parameters with json format
48)ENGINE=innodb;
49