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

59 lines
2.6 KiB
MySQL
Raw Normal View History

2002-12-17 20:13:06 +01:00
-- ===================================================================
-- Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
2018-10-27 14:43:12 +02:00
-- Copyright (C) 2009 Regis Houssin <regis.houssin@inodbox.com>
2011-06-29 19:55:32 +02:00
-- Copyright (C) 2011 Laurent Destailleur <eldy@users.sourceforge.net>
2019-01-28 21:39:22 +01:00
-- Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
2002-12-17 20:13:06 +01: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-12-17 20:13:06 +01: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-12-17 20:13:06 +01:00
--
-- ===================================================================
2007-12-02 22:48:15 +01:00
2002-12-17 20:13:06 +01:00
create table llx_don
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
ref varchar(30) DEFAULT NULL, -- Ref donation (TODO change to NOT NULL)
entity integer DEFAULT 1 NOT NULL, -- multi company id
2002-12-17 20:13:06 +01:00
tms timestamp,
2015-03-26 20:43:34 +01:00
fk_statut smallint NOT NULL DEFAULT 0, -- Status of donation promise or validate
datedon datetime, -- Date of the donation/promise
2017-10-29 06:56:05 +01:00
amount double(24,8) DEFAULT 0,
fk_payment integer, -- Id of payment mode
2015-03-18 05:07:32 +01:00
paid smallint default 0 NOT NULL,
2019-01-18 11:23:59 +01:00
fk_soc integer NULL,
2013-03-09 16:19:15 +01:00
firstname varchar(50),
lastname varchar(50),
2002-12-22 15:13:21 +01:00
societe varchar(50),
address text,
2013-03-09 16:19:15 +01:00
zip varchar(30),
town varchar(50),
2015-03-18 05:07:32 +01:00
country varchar(50), -- Deprecated - Replace with fk_country
2019-01-18 11:23:59 +01:00
fk_country integer NOT NULL,
2002-12-22 16:04:04 +01:00
email varchar(255),
2011-06-29 19:55:32 +02:00
phone varchar(24),
phone_mobile varchar(24),
2016-09-23 10:04:27 +02:00
public smallint DEFAULT 1 NOT NULL, -- Donation is public ? (0,1)
fk_projet integer NULL, -- Donation is given for a project ?
datec datetime, -- Create date
2002-12-17 20:13:06 +01:00
fk_user_author integer NOT NULL,
fk_user_modif integer,
2016-09-23 10:04:27 +02:00
date_valid datetime, -- date de validation
2008-11-14 12:43:24 +01:00
fk_user_valid integer NULL,
2013-04-09 17:18:07 +02:00
note_private text,
note_public text,
2011-02-20 21:53:26 +01:00
model_pdf varchar(255),
2017-07-24 11:53:57 +02:00
import_key varchar(14),
extraparams varchar(255) -- for other parameters with json format
2011-02-24 10:57:02 +01:00
)ENGINE=innodb;