Ajout schema db backoffice, execution, facturation
This commit is contained in:
parent
ea389b1f2e
commit
b453bb2f68
13
Metier/schema/backoffice.indiscores.sql
Normal file
13
Metier/schema/backoffice.indiscores.sql
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
CREATE TABLE `indiscores` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`refCmd` varchar(13) CHARACTER SET latin1 NOT NULL,
|
||||||
|
`nbLine` int(11) NOT NULL,
|
||||||
|
`nbLineAdd` int(11) DEFAULT NULL,
|
||||||
|
`nbLineIdValid` int(11) DEFAULT NULL,
|
||||||
|
`dateAdded` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||||
|
`dateLoaded` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||||
|
`nbLineProcess` int(11) DEFAULT NULL,
|
||||||
|
`dateStart` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||||
|
`dateEnd` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=Aria DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci PAGE_CHECKSUM=0 TRANSACTIONAL=0;
|
7
Metier/schema/backoffice.session.sql
Normal file
7
Metier/schema/backoffice.session.sql
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
CREATE TABLE `session` (
|
||||||
|
`id` char(32) CHARACTER SET utf8 NOT NULL DEFAULT '',
|
||||||
|
`modified` int(11) DEFAULT NULL COMMENT 'Timestamp de modification',
|
||||||
|
`lifetime` int(11) DEFAULT NULL COMMENT 'Durée de vie de la session',
|
||||||
|
`data` text CHARACTER SET utf8 COMMENT 'data pour la session',
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=Aria DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci PAGE_CHECKSUM=0 TRANSACTIONAL=0 COMMENT='Clés de session pour authentification backoffice';
|
19
Metier/schema/backoffice.surveillances.sql
Normal file
19
Metier/schema/backoffice.surveillances.sql
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
CREATE TABLE `surveillances` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`refCmd` varchar(13) CHARACTER SET utf8 NOT NULL,
|
||||||
|
`nbLine` int(11) NOT NULL,
|
||||||
|
`nbLineLoaded` int(11) NOT NULL,
|
||||||
|
`nbLineIdValid` int(11) NOT NULL,
|
||||||
|
`reportNbAdd` int(11) DEFAULT NULL,
|
||||||
|
`reportNbUpdate` int(11) DEFAULT NULL,
|
||||||
|
`reportNbDelete` int(11) DEFAULT NULL,
|
||||||
|
`dateAdded` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
`dateLoaded` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||||
|
`dateExec` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||||
|
`dateReport` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||||
|
`toReplace` tinyint(1) DEFAULT NULL,
|
||||||
|
`processNbLine` int(11) DEFAULT NULL,
|
||||||
|
`processDateStart` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||||
|
`processDateEnd` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=Aria DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci PAGE_CHECKSUM=0 TRANSACTIONAL=0 COMMENT='Gestion des chargement surveillances';
|
13
Metier/schema/backoffice.surveillances_entity.sql
Normal file
13
Metier/schema/backoffice.surveillances_entity.sql
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
CREATE TABLE `surveillances_entity` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`RefCmd` varchar(13) CHARACTER SET utf8 NOT NULL,
|
||||||
|
`Siren` varchar(9) CHARACTER SET utf8 NOT NULL,
|
||||||
|
`Nic` varchar(5) CHARACTER SET utf8 NOT NULL,
|
||||||
|
`Ref` varchar(255) CHARACTER SET utf8 NOT NULL,
|
||||||
|
`Source` varchar(50) CHARACTER SET utf8 DEFAULT NULL,
|
||||||
|
`Login` varchar(50) CHARACTER SET utf8 NOT NULL,
|
||||||
|
`Email` varchar(255) CHARACTER SET utf8 NOT NULL,
|
||||||
|
`IsValid` tinyint(1) NOT NULL,
|
||||||
|
`Done` enum('added','updated','deleted') CHARACTER SET utf8 DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=Aria DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci PAGE_CHECKSUM=0 TRANSACTIONAL=0 COMMENT='Surveillances - Stockage des lignes ';
|
9
Metier/schema/execution.process.sql
Normal file
9
Metier/schema/execution.process.sql
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
CREATE TABLE `process` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`code` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`label` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`description` tinytext COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`category` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Catégorie du processus',
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
UNIQUE KEY `code` (`code`)
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Liste des traitements';
|
14
Metier/schema/execution.process_jobs.sql
Normal file
14
Metier/schema/execution.process_jobs.sql
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
CREATE TABLE `process_jobs` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`code` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`label` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`schedule` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`command` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`debug` tinyint(4) NOT NULL,
|
||||||
|
`runOnHost` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`maxRuntime` int(11) NOT NULL,
|
||||||
|
`enabled` tinyint(4) NOT NULL,
|
||||||
|
`haltDir` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
|
||||||
|
`output` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Liste des jobs';
|
10
Metier/schema/execution.process_out.sql
Normal file
10
Metier/schema/execution.process_out.sql
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
CREATE TABLE `process_out` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`code` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`dateStart` datetime NOT NULL,
|
||||||
|
`dateEnd` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||||
|
`unitTotal` int(11) NOT NULL DEFAULT '0',
|
||||||
|
`unitExec` int(11) NOT NULL DEFAULT '0',
|
||||||
|
`updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Execution des processus';
|
5
Metier/schema/facturation.client.sql
Normal file
5
Metier/schema/facturation.client.sql
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
CREATE TABLE `client` (
|
||||||
|
`id` int(11) NOT NULL,
|
||||||
|
`code` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Relation id client et code client';
|
14
Metier/schema/facturation.client_adresse.sql
Normal file
14
Metier/schema/facturation.client_adresse.sql
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
CREATE TABLE `client_adresse` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`clientCode` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`label` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`L1` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`L2` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`L3` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`L4` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`L5` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`L6` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`L7` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`L8` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
11
Metier/schema/facturation.client_contact.sql
Normal file
11
Metier/schema/facturation.client_contact.sql
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
CREATE TABLE `client_contact` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`clientCode` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`label` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`genre` enum('M','Mme','Mlle') COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`nom` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`prenom` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`email` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`tel` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
14
Metier/schema/facturation.contrat.sql
Normal file
14
Metier/schema/facturation.contrat.sql
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
CREATE TABLE `contrat` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`category` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`label` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`ref` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`dateBegin` date NOT NULL,
|
||||||
|
`dateEnd` date NOT NULL,
|
||||||
|
`factBegin` date NOT NULL,
|
||||||
|
`factEnd` date NOT NULL,
|
||||||
|
`period` tinyint(4) NOT NULL,
|
||||||
|
`global` tinyint(1) NOT NULL,
|
||||||
|
`reconduction` tinyint(1) NOT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
8
Metier/schema/facturation.contrat_articles.sql
Normal file
8
Metier/schema/facturation.contrat_articles.sql
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
CREATE TABLE `contrat_articles` (
|
||||||
|
`code` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`label` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`value` decimal(10,2) DEFAULT NULL,
|
||||||
|
`valueFormat` enum('montant','percent') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||||
|
`category` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
PRIMARY KEY (`code`)
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Liste des codes articles';
|
5
Metier/schema/facturation.contrat_category.sql
Normal file
5
Metier/schema/facturation.contrat_category.sql
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
CREATE TABLE `contrat_category` (
|
||||||
|
`code` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`label` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
PRIMARY KEY (`code`)
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Liste des catégories de prestations';
|
11
Metier/schema/facturation.contrat_conso.sql
Normal file
11
Metier/schema/facturation.contrat_conso.sql
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
CREATE TABLE `contrat_conso` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`contratId` int(11) NOT NULL,
|
||||||
|
`detailId` int(11) NOT NULL,
|
||||||
|
`code` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`type` enum('ForfaitNoLimit','ForfaitLimit','Unitaire') COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`montant` decimal(10,2) NOT NULL,
|
||||||
|
`max` int(11) NOT NULL,
|
||||||
|
`doublon` enum('none','day','month','period') COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Détail des éléments unitaire pour la facturation';
|
11
Metier/schema/facturation.contrat_detail.sql
Normal file
11
Metier/schema/facturation.contrat_detail.sql
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
CREATE TABLE `contrat_detail` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`contratId` int(11) NOT NULL,
|
||||||
|
`code` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`label` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`type` enum('forfait','conso') COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`terme` enum('debut','fin') COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`taxe` decimal(4,2) NOT NULL,
|
||||||
|
`itemOrder` int(11) NOT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Détail d''un contrat';
|
9
Metier/schema/facturation.contrat_forfait.sql
Normal file
9
Metier/schema/facturation.contrat_forfait.sql
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
CREATE TABLE `contrat_forfait` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`contratId` int(11) NOT NULL,
|
||||||
|
`detailId` int(11) NOT NULL,
|
||||||
|
`code` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`periodNum` int(2) NOT NULL,
|
||||||
|
`montant` decimal(10,2) NOT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Détail des éléments forfaitaires pour la facturation';
|
10
Metier/schema/facturation.contrat_link.sql
Normal file
10
Metier/schema/facturation.contrat_link.sql
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
CREATE TABLE `contrat_link` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`contratId` int(11) NOT NULL,
|
||||||
|
`clientId` int(11) NOT NULL,
|
||||||
|
`code` int(11) NOT NULL,
|
||||||
|
`type` enum('service','presta') COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`adresseId` int(11) NOT NULL,
|
||||||
|
`contactId` int(11) NOT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='lien contrat / prestation';
|
19
Metier/schema/facturation.facture.sql
Normal file
19
Metier/schema/facturation.facture.sql
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
CREATE TABLE `facture` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`num` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`clientCode` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`label` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`type` enum('facture','avoir') COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`paiement` enum('none','virement','cheque') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'none',
|
||||||
|
`date` date NOT NULL,
|
||||||
|
`dateDue` date NOT NULL,
|
||||||
|
`periodBegin` date NOT NULL,
|
||||||
|
`periodEnd` date NOT NULL,
|
||||||
|
`mtHT` decimal(10,2) NOT NULL DEFAULT '0.00',
|
||||||
|
`mtTTC` decimal(10,2) NOT NULL DEFAULT '0.00',
|
||||||
|
`valid` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||||
|
`sent` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||||
|
`added` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||||
|
`updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Factures';
|
12
Metier/schema/facturation.facture_line.sql
Normal file
12
Metier/schema/facturation.facture_line.sql
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
CREATE TABLE `facture_line` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`factId` int(11) NOT NULL,
|
||||||
|
`num` int(11) NOT NULL,
|
||||||
|
`code` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`zonetxt` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`qte` decimal(10,2) NOT NULL,
|
||||||
|
`montantUnit` decimal(10,2) NOT NULL,
|
||||||
|
`montantLine` decimal(10,2) NOT NULL,
|
||||||
|
`tva` decimal(5,2) NOT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Ligne facturation';
|
7
Metier/schema/facturation.facture_zoneclient.sql
Normal file
7
Metier/schema/facturation.facture_zoneclient.sql
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
CREATE TABLE `facture_zoneclient` (
|
||||||
|
`factId` int(11) NOT NULL,
|
||||||
|
`lnum` tinyint(2) NOT NULL,
|
||||||
|
`lvalue` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`lstyle` enum('normal','italic','bold') COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
PRIMARY KEY (`factId`,`lnum`)
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Info zone client en ligne';
|
Loading…
Reference in New Issue
Block a user