1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
| CREATE TABLE `documents` (
`Id` int(10) NOT NULL AUTO_INCREMENT,
`A_TypeDocument` varchar(12) NOT NULL COMMENT 'TYPOLOGIE',
`A_DateTrt` varchar(10) NOT NULL COMMENT 'DATE TRAITEMENT',
`A_Machine` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'MACHINE',
`A_NumTrans` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'TRANSACTION',
`A_Sequence` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'SEQUENCE',
`A_CodeEmetteur` varchar(6) NOT NULL,
`A_CodeEtablissement` varchar(12) DEFAULT NULL,
`A_CodeCentreTip` varchar(6) DEFAULT NULL,
`A_RefOp` varchar(24) NOT NULL DEFAULT '',
`A_NumFormule` varchar(20) NOT NULL DEFAULT '0',
`A_CodeRib` varchar(2) NOT NULL DEFAULT '0',
`A_CodeBanque` varchar(5) NOT NULL DEFAULT '',
`A_CodeGuichet` varchar(5) NOT NULL DEFAULT '',
`A_Compte` varchar(12) NOT NULL,
`A_CleRib` varchar(10) NOT NULL DEFAULT '',
`A_Intitule` varchar(30) NOT NULL DEFAULT '',
`A_NumSerie` varchar(10) NOT NULL DEFAULT '',
`A_Zib` varchar(12) NOT NULL DEFAULT '',
`A_CompteCHQ` varchar(12) NOT NULL DEFAULT '0',
`A_RefMandat` varchar(18) NOT NULL DEFAULT '',
`A_Montant` varchar(16) NOT NULL DEFAULT '0',
`A_Statut` int(10) unsigned NOT NULL DEFAULT '0',
`A_RejetOptique` varchar(10) NOT NULL DEFAULT '',
`A_CodeTraitement` int(10) unsigned NOT NULL DEFAULT '0',
`A_Origine` varchar(4) NOT NULL DEFAULT '',
`A_NumLot` varchar(4) NOT NULL DEFAULT '',
`A_Nom` varchar(60) NOT NULL DEFAULT '',
`A_Prenom` varchar(60) NOT NULL DEFAULT '',
`A_Adresse1` varchar(65) NOT NULL DEFAULT '',
`A_Adresse2` varchar(65) NOT NULL DEFAULT '',
`A_CodePostal` varchar(26) NOT NULL DEFAULT '',
`A_Ville` varchar(20) NOT NULL DEFAULT '',
`A_NumChrono` decimal(9,0) NOT NULL DEFAULT '0',
`A_RefImageRecto` varchar(150) NOT NULL DEFAULT '',
`A_RefImageVerso` varchar(150) NOT NULL DEFAULT '',
`A_NumPortefeuille` varchar(10) NOT NULL DEFAULT '',
`A_IntituleCHQ` varchar(30) NOT NULL DEFAULT '',
`A_CodeBqSaisie` varchar(21) NOT NULL DEFAULT '',
`A_CompteCHQSaisie` varchar(21) NOT NULL DEFAULT '0000-00-00 00:00:00',
`A_DateOrigine` varchar(12) DEFAULT NULL COMMENT 'WKF: Date Origine (SSAAMMJJ)',
`A_DateDecision` varchar(12) DEFAULT NULL COMMENT 'WKF: Date decision (SSAAMMJJ)',
`A_StatutWkf` varchar(16) NOT NULL DEFAULT '0' COMMENT 'WKF: 0=Normal-1=Retour WKF valide 2=Rejet',
`A_Flag01` varchar(1) NOT NULL DEFAULT '0' COMMENT 'WKF: Hors Fourchette',
`A_Flag02` varchar(1) NOT NULL DEFAULT '0' COMMENT 'WKF: Reference',
`A_Flag03` varchar(1) NOT NULL DEFAULT '0' COMMENT 'WKF: Code Traitement',
`A_Flag04` varchar(1) NOT NULL DEFAULT '0' COMMENT 'WKF: Anomalie',
`A_FlagMANDAT` varchar(1) NOT NULL DEFAULT '0' COMMENT 'WKF: Mandat',
`A_WorkFlow` varchar(25) NOT NULL DEFAULT '0',
`A_DateInsert` varchar(22) NOT NULL DEFAULT '',
`A_NomFicInsert` varchar(100) NOT NULL DEFAULT '0000-00-00 00:00:00',
`TimeStamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`Id`),
KEY `IX_PK` (`A_DateTrt`,`A_Machine`,`A_NumTrans`,`A_Sequence`,`A_CodeEmetteur`),
KEY `IX_DATETRT` (`A_DateTrt`),
KEY `IX_TYPO` (`A_TypeDocument`),
KEY `IX_REFOP` (`A_RefOp`),
KEY `IX_TRS` (`A_NumTrans`,`A_Sequence`),
KEY `IX_DATEORIGINE` (`A_DateOrigine`),
KEY `IX_EMETTEUR` (`A_CodeEmetteur`),
KEY `IX_STATUSWF` (`A_StatutWkf`),
KEY `IX_MNT` (`A_DateTrt`,`A_Montant`) USING BTREE,
KEY `IX_NUMSERIE` (`A_DateTrt`,`A_NumSerie`) USING BTREE,
KEY `UNIQUE` (`A_DateTrt`,`A_Machine`,`A_NumTrans`,`A_TypeDocument`) USING BTREE,
KEY `IX_BQUE` (`A_CodeBanque`),
KEY `IX_GUI` (`A_CodeGuichet`),
KEY `IX_ZIB` (`A_Zib`),
KEY `IX_PRTF` (`A_NumPortefeuille`),
KEY `IX_NUMLOT` (`A_NumLot`) USING BTREE,
KEY `IX_MAC` (`A_Machine`,`A_NumTrans`,`A_Sequence`),
KEY `IX_SEQ` (`A_Sequence`),
KEY `IX_CPTECHQ` (`A_CompteCHQ`)
) ENGINE=InnoDb AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; |
Partager