llx_ticket-ticket.sql 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. -- SQL definition for module ticket
  2. -- Copyright (C) 2013 Jean-François FERRY <hello@librethic.io>
  3. --
  4. -- This program is free software: you can redistribute it and/or modify
  5. -- it under the terms of the GNU General Public License as published by
  6. -- the Free Software Foundation, either version 3 of the License, or
  7. -- (at your option) any later version.
  8. --
  9. -- This program is distributed in the hope that it will be useful,
  10. -- but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. -- GNU General Public License for more details.
  13. --
  14. -- You should have received a copy of the GNU General Public License
  15. -- along with this program. If not, see <https://www.gnu.org/licenses/>.
  16. CREATE TABLE llx_ticket
  17. (
  18. rowid integer AUTO_INCREMENT PRIMARY KEY,
  19. entity integer DEFAULT 1,
  20. ref varchar(128) NOT NULL,
  21. track_id varchar(128) NOT NULL,
  22. fk_soc integer DEFAULT 0,
  23. fk_project integer DEFAULT 0,
  24. origin_email varchar(128),
  25. fk_user_create integer,
  26. fk_user_assign integer,
  27. subject varchar(255),
  28. message mediumtext,
  29. fk_statut integer,
  30. resolution integer,
  31. progress integer DEFAULT 0, -- progression 0 - 100 or null
  32. timing varchar(20),
  33. type_code varchar(32),
  34. category_code varchar(32),
  35. severity_code varchar(32),
  36. datec datetime, -- date of creation of record
  37. date_read datetime,
  38. date_last_msg_sent datetime,
  39. date_close datetime,
  40. notify_tiers_at_create tinyint,
  41. email_msgid varchar(255), -- if ticket is created by email collector, we store here MSG ID
  42. email_date datetime, -- if ticket is created by email collector, we store here Date of message
  43. ip varchar(250),
  44. tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  45. import_key varchar(14)
  46. )ENGINE=innodb;