llx_projet.sql 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. -- ===========================================================================
  2. -- Copyright (C) 2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
  3. -- Copyright (C) 2010 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. create table llx_projet
  20. (
  21. rowid integer AUTO_INCREMENT PRIMARY KEY,
  22. fk_soc integer,
  23. datec datetime, -- date creation project
  24. tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  25. dateo date, -- date start project
  26. datee date, -- date end project
  27. ref varchar(50),
  28. entity integer DEFAULT 1 NOT NULL, -- multi company id
  29. title varchar(255) NOT NULL,
  30. description text,
  31. fk_user_creat integer NOT NULL, -- createur du projet
  32. fk_user_modif integer,
  33. public integer, -- project is public or not
  34. fk_statut integer DEFAULT 0 NOT NULL, -- open or close
  35. fk_opp_status integer DEFAULT NULL, -- if project is used to manage opportunities
  36. opp_percent double(5,2),
  37. fk_opp_status_end integer DEFAULT NULL, -- if project is used to manage opportunities (the opportunity status the project has when set to lose)
  38. date_close datetime DEFAULT NULL,
  39. fk_user_close integer DEFAULT NULL,
  40. note_private text,
  41. note_public text,
  42. email_msgid varchar(175), -- if project or lead is created by email collector, we store here MSG ID. Do not use a too large value, it generates trouble with unique index
  43. --budget_days real, -- budget in days is sum of field planned_workload of tasks
  44. opp_amount double(24,8),
  45. budget_amount double(24,8),
  46. usage_opportunity integer DEFAULT 0, -- Set to 1 if project is used to follow an opportunity
  47. usage_task integer DEFAULT 1, -- Set to 1 if project is used to manage tasks and/or record timesheet
  48. usage_bill_time integer DEFAULT 0, -- Set to 1 if time spent must be converted into invoices
  49. usage_organize_event integer DEFAULT 0, -- Set to 1 if you want to use project to organize an event or receive attendees registration
  50. date_start_event datetime, -- date start event
  51. date_end_event datetime, -- date end event
  52. location varchar(255), -- location
  53. accept_conference_suggestions integer DEFAULT 0, -- Set to 1 if you want to allow unknown people to suggest conferences
  54. accept_booth_suggestions integer DEFAULT 0, -- Set to 1 if you want to Allow unknown people to suggest booth
  55. max_attendees integer DEFAULT 0,
  56. price_registration double(24,8),
  57. price_booth double(24,8),
  58. model_pdf varchar(255),
  59. ip varchar(250), -- ip used to create record (for public submission page)
  60. last_main_doc varchar(255), -- relative filepath+filename of last main generated document
  61. import_key varchar(14), -- Import key
  62. extraparams varchar(255) -- to save other parameters with json format
  63. )ENGINE=innodb;