llx_asset_model-asset.sql 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. -- ========================================================================
  2. -- Copyright (C) 2022 OpenDSI <support@open-dsi.fr>
  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. -- Table for fixed asset model
  19. --
  20. -- Data example:
  21. -- INSERT INTO llx_asset_model (entity, ref, label, asset_type, note_public, note_private, date_creation, tms, fk_user_creat, fk_user_modif, import_key, status) VALUES
  22. -- (1, 'LAPTOP', 'Laptop', 1, NULL, NULL, '2022-01-18 14:27:09', '2022-01-24 09:31:49', 1, 1, NULL, 1);
  23. CREATE TABLE llx_asset_model(
  24. rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
  25. entity integer DEFAULT 1 NOT NULL, -- multi company id
  26. ref varchar(128) NOT NULL,
  27. label varchar(255) NOT NULL,
  28. asset_type smallint NOT NULL,
  29. fk_pays integer DEFAULT 0,
  30. note_public text,
  31. note_private text,
  32. date_creation datetime NOT NULL,
  33. tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  34. fk_user_creat integer NOT NULL,
  35. fk_user_modif integer,
  36. import_key varchar(14),
  37. status smallint NOT NULL
  38. ) ENGINE=innodb;