llx_holiday.sql 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. -- ===================================================================
  2. -- Copyright (C) 2012 Laurent Destailleur <eldy@users.sourceforge.net>
  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. --
  17. -- ===================================================================
  18. CREATE TABLE llx_holiday
  19. (
  20. rowid integer NOT NULL AUTO_INCREMENT PRIMARY KEY,
  21. ref varchar(30) NOT NULL,
  22. ref_ext varchar(255),
  23. entity integer DEFAULT 1 NOT NULL, -- Multi company id
  24. fk_user integer NOT NULL,
  25. fk_user_create integer,
  26. fk_user_modif integer,
  27. fk_type integer NOT NULL,
  28. date_create DATETIME NOT NULL,
  29. description VARCHAR( 255 ) NOT NULL,
  30. date_debut DATE NOT NULL,
  31. date_fin DATE NOT NULL,
  32. halfday integer DEFAULT 0, -- 0=start morning and end afternoon, -1=start afternoon end afternoon, 1=start morning and end morning, 2=start afternoon and end morning
  33. nb_open_day double(24,8) DEFAULT NULL, -- denormalized number of open days of holiday. Not always set. More reliable when re-calculated with num_open_days(date_debut, date_fin, halfday).
  34. statut integer NOT NULL DEFAULT 1, -- status of leave request
  35. fk_validator integer NOT NULL, -- who should approve the leave
  36. date_valid DATETIME DEFAULT NULL, -- date validation
  37. fk_user_valid integer DEFAULT NULL, -- user validation
  38. date_approval DATETIME DEFAULT NULL, -- date approval
  39. fk_user_approve integer DEFAULT NULL, -- user approval
  40. date_refuse DATETIME DEFAULT NULL,
  41. fk_user_refuse integer DEFAULT NULL,
  42. date_cancel DATETIME DEFAULT NULL,
  43. fk_user_cancel integer DEFAULT NULL,
  44. detail_refuse varchar( 250 ) DEFAULT NULL,
  45. note_private text,
  46. note_public text,
  47. tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  48. import_key varchar(14),
  49. extraparams varchar(255) -- for other parameters with json format
  50. )
  51. ENGINE=innodb;