2155 lines
55 KiB
JSON
2155 lines
55 KiB
JSON
{
|
|
"version": "5",
|
|
"dialect": "mysql",
|
|
"id": "2f65da14-e565-4c26-9983-e26b82f2b202",
|
|
"prevId": "19bfff40-ca0c-46d4-8234-43ca7aac0eaa",
|
|
"tables": {
|
|
"accountingAllocationList": {
|
|
"name": "accountingAllocationList",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"userId": {
|
|
"name": "userId",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"createdAt": {
|
|
"name": "createdAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"user_allocation_unique": {
|
|
"name": "user_allocation_unique",
|
|
"columns": [
|
|
"userId",
|
|
"name"
|
|
],
|
|
"isUnique": true
|
|
}
|
|
},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {
|
|
"accountingAllocationList_id": {
|
|
"name": "accountingAllocationList_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"automationRules": {
|
|
"name": "automationRules",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"userId": {
|
|
"name": "userId",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"isActive": {
|
|
"name": "isActive",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 1
|
|
},
|
|
"priority": {
|
|
"name": "priority",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 0
|
|
},
|
|
"conditions": {
|
|
"name": "conditions",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"conditionsLogic": {
|
|
"name": "conditionsLogic",
|
|
"type": "enum('AND','OR')",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "'AND'"
|
|
},
|
|
"actions": {
|
|
"name": "actions",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"createdAt": {
|
|
"name": "createdAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
},
|
|
"updatedAt": {
|
|
"name": "updatedAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"onUpdate": true,
|
|
"default": "(now())"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {
|
|
"automationRules_id": {
|
|
"name": "automationRules_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"bapHistory": {
|
|
"name": "bapHistory",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"userId": {
|
|
"name": "userId",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"invoiceId": {
|
|
"name": "invoiceId",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"supplierName": {
|
|
"name": "supplierName",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"invoiceNumber": {
|
|
"name": "invoiceNumber",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"invoiceDate": {
|
|
"name": "invoiceDate",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"totalAmount": {
|
|
"name": "totalAmount",
|
|
"type": "varchar(50)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"typeAchat": {
|
|
"name": "typeAchat",
|
|
"type": "varchar(50)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"serviceConcerne": {
|
|
"name": "serviceConcerne",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"ventilationComptable": {
|
|
"name": "ventilationComptable",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"recipientName": {
|
|
"name": "recipientName",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"exportMode": {
|
|
"name": "exportMode",
|
|
"type": "enum('browser','folder')",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "'browser'"
|
|
},
|
|
"exportPath": {
|
|
"name": "exportPath",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"pdfUrl": {
|
|
"name": "pdfUrl",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"signatureName": {
|
|
"name": "signatureName",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"sharepointUploadStatus": {
|
|
"name": "sharepointUploadStatus",
|
|
"type": "enum('success','error','skipped')",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"sharepointUploadPath": {
|
|
"name": "sharepointUploadPath",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"sharepointUploadError": {
|
|
"name": "sharepointUploadError",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"validatedAt": {
|
|
"name": "validatedAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {
|
|
"bapHistory_id": {
|
|
"name": "bapHistory_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"departmentList": {
|
|
"name": "departmentList",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"userId": {
|
|
"name": "userId",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"createdAt": {
|
|
"name": "createdAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"user_department_unique": {
|
|
"name": "user_department_unique",
|
|
"columns": [
|
|
"userId",
|
|
"name"
|
|
],
|
|
"isUnique": true
|
|
}
|
|
},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {
|
|
"departmentList_id": {
|
|
"name": "departmentList_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"freeproImports": {
|
|
"name": "freeproImports",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"userId": {
|
|
"name": "userId",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"moisLabel": {
|
|
"name": "moisLabel",
|
|
"type": "varchar(10)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"annee": {
|
|
"name": "annee",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"mois": {
|
|
"name": "mois",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"refPiece": {
|
|
"name": "refPiece",
|
|
"type": "varchar(50)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"fileName": {
|
|
"name": "fileName",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"nbLignes": {
|
|
"name": "nbLignes",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 0
|
|
},
|
|
"totalTtc": {
|
|
"name": "totalTtc",
|
|
"type": "varchar(30)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"sharepointUploadStatus": {
|
|
"name": "sharepointUploadStatus",
|
|
"type": "enum('success','error')",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"sharepointUploadPath": {
|
|
"name": "sharepointUploadPath",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"sharepointUploadError": {
|
|
"name": "sharepointUploadError",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"sharepointExportedAt": {
|
|
"name": "sharepointExportedAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"createdAt": {
|
|
"name": "createdAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
},
|
|
"updatedAt": {
|
|
"name": "updatedAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"onUpdate": true,
|
|
"default": "(now())"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {
|
|
"freeproImports_id": {
|
|
"name": "freeproImports_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"freeproSettings": {
|
|
"name": "freeproSettings",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"userId": {
|
|
"name": "userId",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"portalUrl": {
|
|
"name": "portalUrl",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "'https://pro.free.fr'"
|
|
},
|
|
"loginEmail": {
|
|
"name": "loginEmail",
|
|
"type": "varchar(320)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"loginPassword": {
|
|
"name": "loginPassword",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"frequency": {
|
|
"name": "frequency",
|
|
"type": "enum('manual','daily','weekly','monthly')",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "'manual'"
|
|
},
|
|
"maxAnteriority": {
|
|
"name": "maxAnteriority",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"autoEnabled": {
|
|
"name": "autoEnabled",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 0
|
|
},
|
|
"lastSuccessAt": {
|
|
"name": "lastSuccessAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"lastStatus": {
|
|
"name": "lastStatus",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"lastImportCount": {
|
|
"name": "lastImportCount",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": 0
|
|
},
|
|
"createdAt": {
|
|
"name": "createdAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
},
|
|
"updatedAt": {
|
|
"name": "updatedAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"onUpdate": true,
|
|
"default": "(now())"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {
|
|
"freeproSettings_id": {
|
|
"name": "freeproSettings_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {
|
|
"freeproSettings_userId_unique": {
|
|
"name": "freeproSettings_userId_unique",
|
|
"columns": [
|
|
"userId"
|
|
]
|
|
}
|
|
},
|
|
"checkConstraint": {}
|
|
},
|
|
"freeproVentilationLines": {
|
|
"name": "freeproVentilationLines",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"importId": {
|
|
"name": "importId",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"structure": {
|
|
"name": "structure",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"type": {
|
|
"name": "type",
|
|
"type": "varchar(50)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"montantCentimes": {
|
|
"name": "montantCentimes",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"createdAt": {
|
|
"name": "createdAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {
|
|
"freeproVentilationLines_id": {
|
|
"name": "freeproVentilationLines_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"importLogs": {
|
|
"name": "importLogs",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"userId": {
|
|
"name": "userId",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"sourceFileId": {
|
|
"name": "sourceFileId",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"fileName": {
|
|
"name": "fileName",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"totalInvoicesDetected": {
|
|
"name": "totalInvoicesDetected",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 0
|
|
},
|
|
"invoicesImported": {
|
|
"name": "invoicesImported",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 0
|
|
},
|
|
"duplicatesIgnored": {
|
|
"name": "duplicatesIgnored",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 0
|
|
},
|
|
"errors": {
|
|
"name": "errors",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 0
|
|
},
|
|
"duplicateDetails": {
|
|
"name": "duplicateDetails",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"errorDetails": {
|
|
"name": "errorDetails",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"warningMessage": {
|
|
"name": "warningMessage",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"importSource": {
|
|
"name": "importSource",
|
|
"type": "enum('file','folder','email')",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "'file'"
|
|
},
|
|
"importedAt": {
|
|
"name": "importedAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {
|
|
"importLogs_id": {
|
|
"name": "importLogs_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"importSettings": {
|
|
"name": "importSettings",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"userId": {
|
|
"name": "userId",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"manualImportEnabled": {
|
|
"name": "manualImportEnabled",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 1
|
|
},
|
|
"autoImportEnabled": {
|
|
"name": "autoImportEnabled",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 0
|
|
},
|
|
"autoImportSourcePath": {
|
|
"name": "autoImportSourcePath",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"autoImportFrequency": {
|
|
"name": "autoImportFrequency",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 60
|
|
},
|
|
"emailImportEnabled": {
|
|
"name": "emailImportEnabled",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 0
|
|
},
|
|
"emailImportAddress": {
|
|
"name": "emailImportAddress",
|
|
"type": "varchar(320)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"emailImportPassword": {
|
|
"name": "emailImportPassword",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"emailImportHost": {
|
|
"name": "emailImportHost",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"emailImportPort": {
|
|
"name": "emailImportPort",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": 993
|
|
},
|
|
"emailImportFrequency": {
|
|
"name": "emailImportFrequency",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 30
|
|
},
|
|
"emailImportSinceDate": {
|
|
"name": "emailImportSinceDate",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"emailImportAuthMode": {
|
|
"name": "emailImportAuthMode",
|
|
"type": "enum('basic','oauth2')",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "'basic'"
|
|
},
|
|
"exportFolder": {
|
|
"name": "exportFolder",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"exportFolderType": {
|
|
"name": "exportFolderType",
|
|
"type": "enum('local','teams','sharepoint')",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "'local'"
|
|
},
|
|
"bapExportMode": {
|
|
"name": "bapExportMode",
|
|
"type": "enum('browser','folder','both')",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "'browser'"
|
|
},
|
|
"azureTenantId": {
|
|
"name": "azureTenantId",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"azureClientId": {
|
|
"name": "azureClientId",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"azureClientSecret": {
|
|
"name": "azureClientSecret",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"azureSecretExpiresAt": {
|
|
"name": "azureSecretExpiresAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"aiProvider": {
|
|
"name": "aiProvider",
|
|
"type": "enum('mistral','manus')",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "'mistral'"
|
|
},
|
|
"mistralApiKey": {
|
|
"name": "mistralApiKey",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"manusForgeApiKey": {
|
|
"name": "manusForgeApiKey",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"manusForgeApiUrl": {
|
|
"name": "manusForgeApiUrl",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"createdAt": {
|
|
"name": "createdAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
},
|
|
"updatedAt": {
|
|
"name": "updatedAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"onUpdate": true,
|
|
"default": "(now())"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {
|
|
"importSettings_id": {
|
|
"name": "importSettings_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {
|
|
"importSettings_userId_unique": {
|
|
"name": "importSettings_userId_unique",
|
|
"columns": [
|
|
"userId"
|
|
]
|
|
}
|
|
},
|
|
"checkConstraint": {}
|
|
},
|
|
"invoiceLearnings": {
|
|
"name": "invoiceLearnings",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"userId": {
|
|
"name": "userId",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"supplierKey": {
|
|
"name": "supplierKey",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"fieldName": {
|
|
"name": "fieldName",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"originalValue": {
|
|
"name": "originalValue",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"correctedValue": {
|
|
"name": "correctedValue",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"applyCount": {
|
|
"name": "applyCount",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 1
|
|
},
|
|
"createdAt": {
|
|
"name": "createdAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
},
|
|
"updatedAt": {
|
|
"name": "updatedAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"onUpdate": true,
|
|
"default": "(now())"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {
|
|
"invoiceLearnings_id": {
|
|
"name": "invoiceLearnings_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"invoices": {
|
|
"name": "invoices",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"userId": {
|
|
"name": "userId",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"sourceFileId": {
|
|
"name": "sourceFileId",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"invoiceIndexInFile": {
|
|
"name": "invoiceIndexInFile",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 1
|
|
},
|
|
"fileName": {
|
|
"name": "fileName",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"fileKey": {
|
|
"name": "fileKey",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"fileUrl": {
|
|
"name": "fileUrl",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"supplierName": {
|
|
"name": "supplierName",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"invoiceNumber": {
|
|
"name": "invoiceNumber",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"invoiceDate": {
|
|
"name": "invoiceDate",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"deliveryNoteNumber": {
|
|
"name": "deliveryNoteNumber",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"orderNumber": {
|
|
"name": "orderNumber",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"totalAmount": {
|
|
"name": "totalAmount",
|
|
"type": "decimal(10,2)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"recipientName": {
|
|
"name": "recipientName",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"pageRange": {
|
|
"name": "pageRange",
|
|
"type": "varchar(20)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"qualityScore": {
|
|
"name": "qualityScore",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"metadataFileKey": {
|
|
"name": "metadataFileKey",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"metadataFileUrl": {
|
|
"name": "metadataFileUrl",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"status": {
|
|
"name": "status",
|
|
"type": "enum('processing','completed','error')",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "'processing'"
|
|
},
|
|
"errorMessage": {
|
|
"name": "errorMessage",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"exportStatus": {
|
|
"name": "exportStatus",
|
|
"type": "enum('not_exported','exported','export_error')",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "'not_exported'"
|
|
},
|
|
"manuallyEdited": {
|
|
"name": "manuallyEdited",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 0
|
|
},
|
|
"serviceConcerne": {
|
|
"name": "serviceConcerne",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"typeAchat": {
|
|
"name": "typeAchat",
|
|
"type": "enum('CAPEX','OPEX')",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"ventilationComptable": {
|
|
"name": "ventilationComptable",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"autoFilledFields": {
|
|
"name": "autoFilledFields",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"extractedText": {
|
|
"name": "extractedText",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"isSubscription": {
|
|
"name": "isSubscription",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 0
|
|
},
|
|
"bapValidated": {
|
|
"name": "bapValidated",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 0
|
|
},
|
|
"bapValidatedAt": {
|
|
"name": "bapValidatedAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"exportedAt": {
|
|
"name": "exportedAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"exportMode": {
|
|
"name": "exportMode",
|
|
"type": "enum('manual','automatic')",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"createdAt": {
|
|
"name": "createdAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
},
|
|
"updatedAt": {
|
|
"name": "updatedAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"onUpdate": true,
|
|
"default": "(now())"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"supplier_invoice_date_unique": {
|
|
"name": "supplier_invoice_date_unique",
|
|
"columns": [
|
|
"supplierName",
|
|
"invoiceNumber",
|
|
"invoiceDate"
|
|
],
|
|
"isUnique": true
|
|
}
|
|
},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {
|
|
"invoices_id": {
|
|
"name": "invoices_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"llmFieldsConfig": {
|
|
"name": "llmFieldsConfig",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"userId": {
|
|
"name": "userId",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"fieldName": {
|
|
"name": "fieldName",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"displayName": {
|
|
"name": "displayName",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"isRequired": {
|
|
"name": "isRequired",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 1
|
|
},
|
|
"displayOrder": {
|
|
"name": "displayOrder",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 0
|
|
},
|
|
"createdAt": {
|
|
"name": "createdAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
},
|
|
"updatedAt": {
|
|
"name": "updatedAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"onUpdate": true,
|
|
"default": "(now())"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {
|
|
"llmFieldsConfig_id": {
|
|
"name": "llmFieldsConfig_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"llmLogs": {
|
|
"name": "llmLogs",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"userId": {
|
|
"name": "userId",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"sourceFileId": {
|
|
"name": "sourceFileId",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"invoiceId": {
|
|
"name": "invoiceId",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"operation": {
|
|
"name": "operation",
|
|
"type": "varchar(50)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"model": {
|
|
"name": "model",
|
|
"type": "varchar(50)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"promptSent": {
|
|
"name": "promptSent",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"rawResponse": {
|
|
"name": "rawResponse",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"cleanedResponse": {
|
|
"name": "cleanedResponse",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"success": {
|
|
"name": "success",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 1
|
|
},
|
|
"errorMessage": {
|
|
"name": "errorMessage",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"processingTimeMs": {
|
|
"name": "processingTimeMs",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"pageRange": {
|
|
"name": "pageRange",
|
|
"type": "varchar(50)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"createdAt": {
|
|
"name": "createdAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {
|
|
"llmLogs_id": {
|
|
"name": "llmLogs_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"serviceSignatures": {
|
|
"name": "serviceSignatures",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"userId": {
|
|
"name": "userId",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"serviceName": {
|
|
"name": "serviceName",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"signatureId": {
|
|
"name": "signatureId",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"createdAt": {
|
|
"name": "createdAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
},
|
|
"updatedAt": {
|
|
"name": "updatedAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"onUpdate": true,
|
|
"default": "(now())"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"user_service_unique": {
|
|
"name": "user_service_unique",
|
|
"columns": [
|
|
"userId",
|
|
"serviceName"
|
|
],
|
|
"isUnique": true
|
|
}
|
|
},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {
|
|
"serviceSignatures_id": {
|
|
"name": "serviceSignatures_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"signatures": {
|
|
"name": "signatures",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"userId": {
|
|
"name": "userId",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"firstName": {
|
|
"name": "firstName",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"lastName": {
|
|
"name": "lastName",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"imageKey": {
|
|
"name": "imageKey",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"imageUrl": {
|
|
"name": "imageUrl",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"createdAt": {
|
|
"name": "createdAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
},
|
|
"updatedAt": {
|
|
"name": "updatedAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"onUpdate": true,
|
|
"default": "(now())"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {
|
|
"signatures_id": {
|
|
"name": "signatures_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"sourceFiles": {
|
|
"name": "sourceFiles",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"userId": {
|
|
"name": "userId",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"fileName": {
|
|
"name": "fileName",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"fileKey": {
|
|
"name": "fileKey",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"fileUrl": {
|
|
"name": "fileUrl",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"totalInvoicesDetected": {
|
|
"name": "totalInvoicesDetected",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 0
|
|
},
|
|
"processingStatus": {
|
|
"name": "processingStatus",
|
|
"type": "enum('processing','completed','error')",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "'processing'"
|
|
},
|
|
"processingProgress": {
|
|
"name": "processingProgress",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"createdAt": {
|
|
"name": "createdAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
},
|
|
"updatedAt": {
|
|
"name": "updatedAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"onUpdate": true,
|
|
"default": "(now())"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {
|
|
"sourceFiles_id": {
|
|
"name": "sourceFiles_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"userSettings": {
|
|
"name": "userSettings",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"userId": {
|
|
"name": "userId",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"llmModel": {
|
|
"name": "llmModel",
|
|
"type": "varchar(50)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "'mistral-large-latest'"
|
|
},
|
|
"orderNumberFormat": {
|
|
"name": "orderNumberFormat",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"invoiceNumberKeywords": {
|
|
"name": "invoiceNumberKeywords",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"deliveryNoteKeywords": {
|
|
"name": "deliveryNoteKeywords",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"orderNumberKeywords": {
|
|
"name": "orderNumberKeywords",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"supplierKeywords": {
|
|
"name": "supplierKeywords",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"totalAmountKeywords": {
|
|
"name": "totalAmountKeywords",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"subscriptionKeywords": {
|
|
"name": "subscriptionKeywords",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"recipientKeywords": {
|
|
"name": "recipientKeywords",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"sftpRecipientFilter": {
|
|
"name": "sftpRecipientFilter",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"sftpHost": {
|
|
"name": "sftpHost",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"sftpPort": {
|
|
"name": "sftpPort",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": 22
|
|
},
|
|
"sftpUsername": {
|
|
"name": "sftpUsername",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"sftpPassword": {
|
|
"name": "sftpPassword",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"sftpRemotePath": {
|
|
"name": "sftpRemotePath",
|
|
"type": "varchar(500)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": "'/'"
|
|
},
|
|
"sftpAutoExport": {
|
|
"name": "sftpAutoExport",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 0
|
|
},
|
|
"llmLogsRetentionMonths": {
|
|
"name": "llmLogsRetentionMonths",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 3
|
|
},
|
|
"learningConfidenceThreshold": {
|
|
"name": "learningConfidenceThreshold",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 2
|
|
},
|
|
"aiProvider": {
|
|
"name": "aiProvider",
|
|
"type": "enum('mistral','manus')",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "'mistral'"
|
|
},
|
|
"mistralApiKey": {
|
|
"name": "mistralApiKey",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"manusForgeApiKey": {
|
|
"name": "manusForgeApiKey",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"manusForgeApiUrl": {
|
|
"name": "manusForgeApiUrl",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"createdAt": {
|
|
"name": "createdAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
},
|
|
"updatedAt": {
|
|
"name": "updatedAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"onUpdate": true,
|
|
"default": "(now())"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {
|
|
"userSettings_id": {
|
|
"name": "userSettings_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {
|
|
"userSettings_userId_unique": {
|
|
"name": "userSettings_userId_unique",
|
|
"columns": [
|
|
"userId"
|
|
]
|
|
}
|
|
},
|
|
"checkConstraint": {}
|
|
},
|
|
"users": {
|
|
"name": "users",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"openId": {
|
|
"name": "openId",
|
|
"type": "varchar(64)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"azureAdId": {
|
|
"name": "azureAdId",
|
|
"type": "varchar(128)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"email": {
|
|
"name": "email",
|
|
"type": "varchar(320)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"passwordHash": {
|
|
"name": "passwordHash",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"loginMethod": {
|
|
"name": "loginMethod",
|
|
"type": "enum('manus','local','azure-ad')",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"role": {
|
|
"name": "role",
|
|
"type": "enum('user','admin')",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "'user'"
|
|
},
|
|
"isActive": {
|
|
"name": "isActive",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 1
|
|
},
|
|
"createdAt": {
|
|
"name": "createdAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
},
|
|
"updatedAt": {
|
|
"name": "updatedAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"onUpdate": true,
|
|
"default": "(now())"
|
|
},
|
|
"lastSignedIn": {
|
|
"name": "lastSignedIn",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {
|
|
"users_id": {
|
|
"name": "users_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {
|
|
"users_openId_unique": {
|
|
"name": "users_openId_unique",
|
|
"columns": [
|
|
"openId"
|
|
]
|
|
},
|
|
"users_azureAdId_unique": {
|
|
"name": "users_azureAdId_unique",
|
|
"columns": [
|
|
"azureAdId"
|
|
]
|
|
},
|
|
"users_email_unique": {
|
|
"name": "users_email_unique",
|
|
"columns": [
|
|
"email"
|
|
]
|
|
}
|
|
},
|
|
"checkConstraint": {}
|
|
}
|
|
},
|
|
"views": {},
|
|
"_meta": {
|
|
"schemas": {},
|
|
"tables": {},
|
|
"columns": {}
|
|
},
|
|
"internal": {
|
|
"tables": {},
|
|
"indexes": {}
|
|
}
|
|
} |