dolibarr/htdocs/install/mysql/tables/llx_user.sql

114 lines
5.0 KiB
MySQL
Raw Normal View History

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>
-- 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
-- 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
fk_establishment integer DEFAULT 0,
2011-05-30 10:21:40 +02:00
2005-07-14 19:17:31 +02:00
datec datetime,
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,
login varchar(50) NOT NULL,
2017-12-10 08:02:57 +01:00
pass_encoding varchar(24),
pass varchar(128),
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),
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),
office_phone varchar(20),
office_fax varchar(20),
user_mobile varchar(20),
personal_mobile varchar(20),
2005-07-14 19:17:31 +02:00
email varchar(255),
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,
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-11-18 15:56:06 +01:00
idpers1 varchar(128),
idpers2 varchar(128),
idpers3 varchar(128),
note_public text,
note text DEFAULT NULL,
2017-03-08 11:34:21 +01:00
model_pdf varchar(255) DEFAULT NULL,
datelastlogin datetime,
datepreviouslogin datetime,
datelastpassvalidation datetime, -- last date we change password or we made a disconnect all
datestartvalidity datetime,
dateendvalidity datetime,
iplastlogin varchar(250),
ippreviouslogin varchar(250),
egroupware_id integer,
ldap_sid varchar(255) DEFAULT NULL,
2010-12-01 22:51:13 +01:00
openid varchar(255),
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.
color varchar(6),
barcode varchar(255) DEFAULT NULL,
fk_barcode_type integer DEFAULT 0,
accountancy_code varchar(32) NULL,
2017-12-10 08:02:57 +01:00
nb_holiday integer DEFAULT 0,
thm double(24,8),
tjm double(24,8),
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
default_range integer,
2019-02-14 19:50:57 +01:00
default_c_exp_tax_cat integer,
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;