llx_adherent.sql 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. -- ===================================================================
  2. -- Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
  3. -- Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org>
  4. -- Copyright (C) 2006-2009 Laurent Destailleur <eldy@users.sourceforge.net>
  5. -- Copyright (C) 2009 Regis Houssin <regis.houssin@inodbox.com>
  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. --
  22. -- state / statut
  23. -- -2 : excluded / exclu
  24. -- -1 : draft / brouillon
  25. -- 0 : canceled / resilie
  26. -- 1 : valid / valide
  27. --
  28. create table llx_adherent
  29. (
  30. rowid integer AUTO_INCREMENT PRIMARY KEY,
  31. ref varchar(30) NOT NULL, -- member reference number
  32. entity integer DEFAULT 1 NOT NULL, -- multi company id
  33. ref_ext varchar(128), -- reference into an external system (not used by dolibarr)
  34. gender varchar(10),
  35. civility varchar(6),
  36. lastname varchar(50),
  37. firstname varchar(50),
  38. login varchar(50), -- login
  39. pass varchar(50), -- password
  40. pass_crypted varchar(128),
  41. fk_adherent_type integer NOT NULL,
  42. morphy varchar(3) NOT NULL, -- EN: legal entity / natural person FR: personne morale / personne physique
  43. societe varchar(128), -- company name (should be same length than societe.name). No more used.
  44. fk_soc integer NULL, -- Link to third party linked to member
  45. address text,
  46. zip varchar(30),
  47. town varchar(50),
  48. state_id integer,
  49. country integer,
  50. email varchar(255),
  51. url varchar(255) NULL,
  52. socialnetworks text DEFAULT NULL, -- json with socialnetworks
  53. --skype varchar(255), -- deprecated
  54. --twitter varchar(255), -- deprecated
  55. --facebook varchar(255), -- deprecated
  56. --linkedin varchar(255), -- deprecated
  57. --instagram varchar(255), -- deprecated
  58. --snapchat varchar(255), -- deprecated
  59. --googleplus varchar(255), -- deprecated
  60. --youtube varchar(255), -- deprecated
  61. --whatsapp varchar(255), -- deprecated
  62. phone varchar(30),
  63. phone_perso varchar(30),
  64. phone_mobile varchar(30),
  65. birth date, -- birthday
  66. photo varchar(255), -- filename or url of photo
  67. statut smallint NOT NULL DEFAULT 0,
  68. public smallint NOT NULL DEFAULT 0, -- certain champ de la fiche sont ils public ou pas ?
  69. datefin datetime, -- end date of validity of the contribution / date de fin de validite de la cotisation
  70. default_lang varchar(6) DEFAULT NULL,
  71. note_private text DEFAULT NULL,
  72. note_public text DEFAULT NULL,
  73. model_pdf varchar(255),
  74. datevalid datetime, -- date of validation
  75. datec datetime, -- date of creation
  76. tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- last modification date
  77. fk_user_author integer, -- can be null because member can be create by a guest
  78. fk_user_mod integer,
  79. fk_user_valid integer,
  80. canvas varchar(32), -- type of canvas if used (null by default)
  81. ip varchar(250), -- ip used to create record (for public membership submission page)
  82. import_key varchar(14) -- Import key
  83. )ENGINE=innodb;