llx_don-don.sql 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. -- ===================================================================
  2. -- Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
  3. -- Copyright (C) 2009 Regis Houssin <regis.houssin@inodbox.com>
  4. -- Copyright (C) 2011 Laurent Destailleur <eldy@users.sourceforge.net>
  5. -- Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
  6. --
  7. -- This program is free software; you can redistribute it and/or modify
  8. -- it under the terms of the GNU General Public License as published by
  9. -- the Free Software Foundation; either version 3 of the License, or
  10. -- (at your option) any later version.
  11. --
  12. -- This program is distributed in the hope that it will be useful,
  13. -- but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. -- GNU General Public License for more details.
  16. --
  17. -- You should have received a copy of the GNU General Public License
  18. -- along with this program. If not, see <https://www.gnu.org/licenses/>.
  19. --
  20. -- ===================================================================
  21. create table llx_don
  22. (
  23. rowid integer AUTO_INCREMENT PRIMARY KEY,
  24. ref varchar(30) DEFAULT NULL, -- Ref donation (TODO change to NOT NULL)
  25. entity integer DEFAULT 1 NOT NULL, -- multi company id
  26. tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  27. fk_statut smallint NOT NULL DEFAULT 0, -- Status of donation promise or validate
  28. datedon datetime, -- Date of the donation/promise
  29. amount double(24,8) DEFAULT 0,
  30. fk_payment integer, -- Id of payment mode
  31. paid smallint default 0 NOT NULL,
  32. fk_soc integer NULL,
  33. firstname varchar(50),
  34. lastname varchar(50),
  35. societe varchar(50),
  36. address text,
  37. zip varchar(30),
  38. town varchar(50),
  39. country varchar(50), -- Deprecated - Replace with fk_country
  40. fk_country integer NOT NULL,
  41. email varchar(255),
  42. phone varchar(24),
  43. phone_mobile varchar(24),
  44. public smallint DEFAULT 1 NOT NULL, -- Donation is public ? (0,1)
  45. fk_projet integer NULL, -- Donation is given for a project ?
  46. datec datetime, -- Create date
  47. fk_user_author integer NOT NULL,
  48. fk_user_modif integer,
  49. date_valid datetime, -- date de validation
  50. fk_user_valid integer NULL,
  51. note_private text,
  52. note_public text,
  53. model_pdf varchar(255),
  54. import_key varchar(14),
  55. extraparams varchar(255) -- for other parameters with json format
  56. )ENGINE=innodb;