llx_categorie.sql 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. -- ============================================================================
  2. -- Copyright (C) 2005 Brice Davoleau <e1davole@iu-vannes.fr>
  3. -- Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
  4. -- Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
  5. -- Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
  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_categorie
  22. (
  23. rowid integer AUTO_INCREMENT PRIMARY KEY,
  24. entity integer DEFAULT 1 NOT NULL, -- multi company id
  25. fk_parent integer DEFAULT 0 NOT NULL,
  26. label varchar(180) NOT NULL, -- category ref/name
  27. ref_ext varchar(255), -- reference into an external system (not used by dolibarr)
  28. type integer DEFAULT 1 NOT NULL, -- category type (product, supplier, customer, member)
  29. description text, -- description of the category
  30. color varchar(8), -- color
  31. fk_soc integer DEFAULT NULL, -- not used by default. Used when option CATEGORY_ASSIGNED_TO_A_CUSTOMER is set.
  32. visible tinyint DEFAULT 1 NOT NULL, -- determine if the products are visible or not
  33. date_creation datetime, -- date creation
  34. tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- last modification date
  35. fk_user_creat integer, -- user making creation
  36. fk_user_modif integer, -- user making last change
  37. import_key varchar(14) -- Import key
  38. )ENGINE=innodb;
  39. --
  40. -- List of codes for the field type
  41. --
  42. -- 0 : product
  43. -- 1 : supplier
  44. -- 2 : customer
  45. --