llx_contrat.sql 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. -- ============================================================================
  2. -- Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
  3. -- Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
  4. -- Copyright (C) 2005-2014 Regis Houssin <regis.houssin@inodbox.com>
  5. --
  6. -- This program is free software; you can redistribute it and/or modify
  7. -- it under the terms of the GNU General Public License as published by
  8. -- the Free Software Foundation; either version 3 of the License, or
  9. -- (at your option) any later version.
  10. --
  11. -- This program is distributed in the hope that it will be useful,
  12. -- but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. -- GNU General Public License for more details.
  15. --
  16. -- You should have received a copy of the GNU General Public License
  17. -- along with this program. If not, see <https://www.gnu.org/licenses/>.
  18. --
  19. -- ============================================================================
  20. create table llx_contrat
  21. (
  22. rowid integer AUTO_INCREMENT PRIMARY KEY,
  23. ref varchar(255), -- contrat reference
  24. ref_customer varchar(255), -- customer contract ref
  25. ref_supplier varchar(255), -- supplier contract ref
  26. ref_ext varchar(255), -- external contract ref
  27. entity integer DEFAULT 1 NOT NULL, -- multi company id
  28. tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  29. datec datetime, -- creation date
  30. date_contrat datetime,
  31. statut smallint DEFAULT 0, -- not used. deprecated
  32. fin_validite datetime,
  33. date_cloture datetime,
  34. fk_soc integer NOT NULL,
  35. fk_projet integer,
  36. fk_commercial_signature integer, -- obsolete
  37. fk_commercial_suivi integer, -- obsolete
  38. fk_user_author integer NOT NULL default 0,
  39. fk_user_modif integer,
  40. fk_user_cloture integer,
  41. note_private text,
  42. note_public text,
  43. model_pdf varchar(255),
  44. last_main_doc varchar(255), -- relative filepath+filename of last main generated document
  45. import_key varchar(14),
  46. extraparams varchar(255)
  47. )ENGINE=innodb;