2002-04-29 22:57:25 +02:00
|
|
|
-- ============================================================================
|
2003-08-04 20:19:15 +02:00
|
|
|
-- Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
2013-04-11 09:15:41 +02:00
|
|
|
-- Copyright (C) 2006-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
2018-10-27 14:43:12 +02:00
|
|
|
-- Copyright (C) 2007-2013 Regis Houssin <regis.houssin@inodbox.com>
|
2002-04-29 22:57:25 +02:00
|
|
|
--
|
|
|
|
|
-- This program is free software; you can redistribute it and/or modify
|
|
|
|
|
-- it under the terms of the GNU General Public License as published by
|
2013-01-16 15:36:08 +01:00
|
|
|
-- the Free Software Foundation; either version 3 of the License, or
|
2002-04-29 22:57:25 +02:00
|
|
|
-- (at your option) any later version.
|
|
|
|
|
--
|
|
|
|
|
-- This program is distributed in the hope that it will be useful,
|
|
|
|
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
-- GNU General Public License for more details.
|
|
|
|
|
--
|
|
|
|
|
-- You should have received a copy of the GNU General Public License
|
2019-09-23 21:55:30 +02:00
|
|
|
-- along with this program. If not, see <https://www.gnu.org/licenses/>.
|
2002-04-29 22:57:25 +02:00
|
|
|
-- ===========================================================================
|
|
|
|
|
|
|
|
|
|
create table llx_user
|
|
|
|
|
(
|
2005-07-14 19:17:31 +02:00
|
|
|
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
2011-05-30 10:21:40 +02:00
|
|
|
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
|
|
|
|
|
2022-04-07 23:44:57 +02:00
|
|
|
ref_employee varchar(50),
|
2011-09-03 17:27:23 +02:00
|
|
|
ref_ext varchar(50), -- reference into an external system (not used by dolibarr)
|
2019-09-11 22:27:09 +02:00
|
|
|
|
2020-11-18 15:56:06 +01:00
|
|
|
admin smallint DEFAULT 0, -- user has admin profile
|
|
|
|
|
|
2017-12-10 08:02:57 +01:00
|
|
|
employee tinyint DEFAULT 1, -- 1 if user is an employee
|
2015-11-11 15:45:55 +01:00
|
|
|
fk_establishment integer DEFAULT 0,
|
2011-05-30 10:21:40 +02:00
|
|
|
|
2005-07-14 19:17:31 +02:00
|
|
|
datec datetime,
|
2020-10-08 12:29:01 +02:00
|
|
|
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
2014-08-04 10:54:22 +02:00
|
|
|
fk_user_creat integer,
|
|
|
|
|
fk_user_modif integer,
|
2017-07-18 10:16:59 +02:00
|
|
|
login varchar(50) NOT NULL,
|
2017-12-10 08:02:57 +01:00
|
|
|
pass_encoding varchar(24),
|
2015-12-06 19:17:39 +01:00
|
|
|
pass varchar(128),
|
2007-04-23 00:55:32 +02:00
|
|
|
pass_crypted varchar(128),
|
2019-09-04 15:41:09 +02:00
|
|
|
pass_temp varchar(128), -- temporary password when asked for forget password or 'hashtoallowreset:YYYMMDDHHMMSS' (where date is max date of validity)
|
2015-05-17 23:43:57 +02:00
|
|
|
api_key varchar(128), -- key to use REST API by this user
|
|
|
|
|
gender varchar(10),
|
2014-08-12 06:03:27 +02:00
|
|
|
civility varchar(6),
|
2013-04-03 18:54:44 +02:00
|
|
|
lastname varchar(50),
|
2005-07-14 19:17:31 +02:00
|
|
|
firstname varchar(50),
|
2017-12-10 08:02:57 +01:00
|
|
|
address varchar(255), -- user personal address
|
|
|
|
|
zip varchar(25), -- zipcode
|
|
|
|
|
town varchar(50), -- town
|
|
|
|
|
fk_state integer DEFAULT 0,
|
|
|
|
|
fk_country integer DEFAULT 0,
|
|
|
|
|
birth date, -- birthday
|
2019-09-11 22:27:09 +02:00
|
|
|
job varchar(128),
|
2005-09-13 10:05:47 +02:00
|
|
|
office_phone varchar(20),
|
|
|
|
|
office_fax varchar(20),
|
|
|
|
|
user_mobile varchar(20),
|
2019-03-16 08:53:06 +01:00
|
|
|
personal_mobile varchar(20),
|
2005-07-14 19:17:31 +02:00
|
|
|
email varchar(255),
|
2019-03-16 08:53:06 +01:00
|
|
|
personal_email varchar(255),
|
2020-11-18 15:56:06 +01:00
|
|
|
signature text DEFAULT NULL,
|
2019-09-11 22:27:09 +02:00
|
|
|
|
|
|
|
|
socialnetworks text DEFAULT NULL, -- json with socialnetworks
|
|
|
|
|
|
2020-11-18 15:56:06 +01:00
|
|
|
--module_comm smallint DEFAULT 1,
|
|
|
|
|
--module_compta smallint DEFAULT 1,
|
2020-06-25 12:17:47 +02:00
|
|
|
|
2022-02-28 12:13:06 +01:00
|
|
|
fk_soc integer NULL, -- id thirdparty if user linked to a company (external user)
|
|
|
|
|
fk_socpeople integer NULL, -- id contact origin if user linked to a contact
|
|
|
|
|
fk_member integer NULL, -- if member if suer linked to a member
|
|
|
|
|
fk_user integer NULL, -- Supervisor, hierarchic parent
|
|
|
|
|
fk_user_expense_validator integer NULL,
|
|
|
|
|
fk_user_holiday_validator integer NULL,
|
2020-06-25 12:17:47 +02:00
|
|
|
|
2020-11-18 15:56:06 +01:00
|
|
|
idpers1 varchar(128),
|
|
|
|
|
idpers2 varchar(128),
|
|
|
|
|
idpers3 varchar(128),
|
|
|
|
|
|
2016-04-09 10:01:22 +02:00
|
|
|
note_public text,
|
2006-08-26 02:25:17 +02:00
|
|
|
note text DEFAULT NULL,
|
2017-03-08 11:34:21 +01:00
|
|
|
model_pdf varchar(255) DEFAULT NULL,
|
2006-08-12 21:07:14 +02:00
|
|
|
datelastlogin datetime,
|
|
|
|
|
datepreviouslogin datetime,
|
2020-11-29 21:01:57 +01:00
|
|
|
datelastpassvalidation datetime, -- last date we change password or we made a disconnect all
|
2020-06-25 12:17:47 +02:00
|
|
|
datestartvalidity datetime,
|
|
|
|
|
dateendvalidity datetime,
|
2019-07-01 15:44:34 +02:00
|
|
|
iplastlogin varchar(250),
|
|
|
|
|
ippreviouslogin varchar(250),
|
2005-07-25 17:41:50 +02:00
|
|
|
egroupware_id integer,
|
2006-06-24 17:13:29 +02:00
|
|
|
ldap_sid varchar(255) DEFAULT NULL,
|
2010-12-01 22:51:13 +01:00
|
|
|
openid varchar(255),
|
2009-04-27 22:37:50 +02:00
|
|
|
statut tinyint DEFAULT 1,
|
2017-12-10 08:02:57 +01:00
|
|
|
photo varchar(255), -- filename or url of photo
|
2020-08-07 14:05:15 +02:00
|
|
|
lang varchar(6), -- default language for communication. Note that language selected by user as interface language is savec into llx_user_param.
|
2013-06-25 11:14:00 +02:00
|
|
|
color varchar(6),
|
2014-03-13 09:11:14 +01:00
|
|
|
barcode varchar(255) DEFAULT NULL,
|
|
|
|
|
fk_barcode_type integer DEFAULT 0,
|
2014-06-29 07:57:42 +02:00
|
|
|
accountancy_code varchar(32) NULL,
|
2017-12-10 08:02:57 +01:00
|
|
|
nb_holiday integer DEFAULT 0,
|
2014-09-13 17:41:26 +02:00
|
|
|
thm double(24,8),
|
|
|
|
|
tjm double(24,8),
|
2016-09-28 19:49:36 +02:00
|
|
|
|
2017-12-10 08:02:57 +01:00
|
|
|
salary double(24,8), -- denormalized value coming from llx_user_employment
|
|
|
|
|
salaryextra double(24,8), -- denormalized value coming from llx_user_employment
|
|
|
|
|
dateemployment date, -- denormalized value coming from llx_user_employment
|
2018-05-12 17:52:56 +02:00
|
|
|
dateemploymentend date, -- denormalized value coming from llx_user_employment
|
2017-12-10 08:02:57 +01:00
|
|
|
weeklyhours double(16,8), -- denormalized value coming from llx_user_employment
|
2017-04-17 04:22:53 +02:00
|
|
|
|
2017-12-10 08:02:57 +01:00
|
|
|
import_key varchar(14), -- import key
|
2017-06-15 11:08:53 +02:00
|
|
|
default_range integer,
|
2019-02-14 19:50:57 +01:00
|
|
|
default_c_exp_tax_cat integer,
|
2022-03-02 11:20:07 +01:00
|
|
|
national_registration_number varchar(50),
|
2020-11-18 15:56:06 +01:00
|
|
|
fk_warehouse integer -- default warehouse os user
|
2011-02-24 10:57:02 +01:00
|
|
|
)ENGINE=innodb;
|