llx_actioncomm.sql 5.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. -- ========================================================================
  2. -- Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
  3. -- Copyright (C) 2005-2017 Laurent Destailleur <eldy@users.sourceforge.net>
  4. -- Copyright (C) 2011 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. -- Table of events and actions (past and to do).
  21. -- This is also the table to track events on other Dolibarr objects.
  22. -- ========================================================================
  23. create table llx_actioncomm
  24. (
  25. id integer AUTO_INCREMENT PRIMARY KEY,
  26. ref varchar(30) NOT NULL,
  27. ref_ext varchar(255), -- reference into an external system (not used by dolibarr). Example: An id coming from google calendar has length between 5 and 1024 chars. An event id must follow rule: chars used in base32hex encoding (i.e. lowercase letters a-v and digits 0-9, see section 3.1.2 in RFC2938)
  28. entity integer DEFAULT 1 NOT NULL, -- multi company id
  29. datep datetime, -- date start
  30. datep2 datetime, -- date end
  31. fk_action integer, -- type of action (optional link with id in llx_c_actioncomm or null)
  32. code varchar(50) NULL, -- code of action for automatic action ('AC_OTH_AUTO' for automatic actions, 'AC_EMAILIN_AUTO' for email input, 'AC_xxx' for manual action...)
  33. datec datetime, -- date creation
  34. tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- last modification date
  35. fk_user_author integer, -- user id of user that has created record
  36. fk_user_mod integer, -- user id of user that has modified record
  37. fk_project integer,
  38. fk_soc integer,
  39. fk_contact integer,
  40. fk_parent integer NOT NULL default 0,
  41. fk_user_action integer, -- user id of owner of action (note that users assigned to event are stored into table 'actioncomm_resources')
  42. fk_user_done integer, -- user id of user that has made action (deprecated)
  43. transparency integer, -- transparency (ical standard). used to say if user assigned to event are busy or not by event. This field may be deprecated if we want to store transparency for each assigned user, moved into table llx_actioncomm_resources.
  44. priority smallint, -- priority (ical standard)
  45. visibility varchar(12) DEFAULT 'default', -- visibility (ical standard) - 'default', 'public', 'private', 'confidential'
  46. fulldayevent smallint NOT NULL default 0, -- full day (ical standard)
  47. percent smallint NOT NULL default 0,
  48. location varchar(128),
  49. durationp real, -- planed duration
  50. label varchar(255) NOT NULL, -- label/title of event or topic of email
  51. note mediumtext, -- private note of event or content of email
  52. calling_duration integer, -- when event is a phone call, duration of phone call
  53. email_subject varchar(255), -- when event was an email, we store here the subject. content is stored into note.
  54. email_msgid varchar(255), -- when event was an email, we store here the msgid
  55. email_from varchar(255), -- when event was an email, we store here the from
  56. email_sender varchar(255), -- when event was an email, we store here the sender
  57. email_to varchar(255), -- when event was an email, we store here the email_to
  58. email_tocc varchar(255), -- when event was an email, we store here the email_tocc
  59. email_tobcc varchar(255), -- when event was an email, we store here the email_tobcc
  60. errors_to varchar(255), -- when event was an email, we store here the erros_to
  61. reply_to varchar(255), -- when event was an email, we store here the reply_to
  62. recurid varchar(128), -- used to store event id to link each other all the repeating event record. It can be the 'iCalUID' as in RFC5545 (an id similar for all the same serie)
  63. recurrule varchar(128), -- contains string with ical format recurring rule like 'FREQ=MONTHLY;INTERVAL=2;BYMONTHDAY=19' or 'FREQ=WEEKLY;BYDAY=MO'
  64. recurdateend datetime, -- no more recurring event after this date
  65. num_vote integer DEFAULT NULL, -- use for Event Organization module
  66. event_paid smallint NOT NULL DEFAULT 0, -- use for Event Organization module
  67. status smallint NOT NULL DEFAULT 0, -- use for Event Organization module for now, but could be use after for event global status
  68. fk_element integer DEFAULT NULL, -- For link to an element (proposal, invoice, order, ...)
  69. elementtype varchar(255) DEFAULT NULL, -- For link to an element (proposal, invoice, order, ...)
  70. ip varchar(250), --ip used to create record (for public submission page)
  71. import_key varchar(14),
  72. extraparams varchar(255) -- for other parameters with json format
  73. )ENGINE=innodb;