Update configuration and state files; adjust microtime values and add CAIKnowledgeCDokumente junction entity with metadata and API documentation
This commit is contained in:
24
custom/Espo/Custom/Controllers/CAIKnowledgeCDokumente.php
Normal file
24
custom/Espo/Custom/Controllers/CAIKnowledgeCDokumente.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
namespace Espo\Custom\Controllers;
|
||||
|
||||
use Espo\Core\Controllers\Record;
|
||||
|
||||
/**
|
||||
* Junction Controller: CAIKnowledge ↔ CDokumente
|
||||
*
|
||||
* Provides REST API access to the junction table with additionalColumns:
|
||||
* - aiDocumentId: External AI document reference
|
||||
* - syncstatus: Sync state tracking (new, unclean, synced, failed)
|
||||
* - lastSync: Last synchronization timestamp
|
||||
*/
|
||||
class CAIKnowledgeCDokumente extends Record
|
||||
{
|
||||
// Inherits all CRUD operations from Record controller
|
||||
//
|
||||
// Available endpoints:
|
||||
// GET /api/v1/CAIKnowledgeCDokumente
|
||||
// GET /api/v1/CAIKnowledgeCDokumente/{id}
|
||||
// POST /api/v1/CAIKnowledgeCDokumente
|
||||
// PUT /api/v1/CAIKnowledgeCDokumente/{id}
|
||||
// DELETE /api/v1/CAIKnowledgeCDokumente/{id}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"labels": {
|
||||
"Create CAIKnowledgeCDokumente": "AI Knowledge-Dokument Verknüpfung erstellen",
|
||||
"CAIKnowledgeCDokumente": "AI Knowledge-Dokument Verknüpfung"
|
||||
},
|
||||
"fields": {
|
||||
"cAIKnowledge": "AI Knowledge",
|
||||
"cAIKnowledgeId": "AI Knowledge ID",
|
||||
"cDokumente": "Dokument",
|
||||
"cDokumenteId": "Dokument ID",
|
||||
"aiDocumentId": "AI Dokument-ID",
|
||||
"syncstatus": "Sync-Status",
|
||||
"lastSync": "Letzte Synchronisation"
|
||||
},
|
||||
"options": {
|
||||
"syncstatus": {
|
||||
"new": "Neu",
|
||||
"unclean": "Unklar",
|
||||
"synced": "Synchronisiert",
|
||||
"failed": "Fehlgeschlagen"
|
||||
}
|
||||
},
|
||||
"tooltips": {
|
||||
"aiDocumentId": "Externe AI-Dokument-Referenz-ID",
|
||||
"syncstatus": "Status der Synchronisation mit externem AI-System",
|
||||
"lastSync": "Zeitpunkt der letzten erfolgreichen Synchronisation"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"labels": {
|
||||
"Create CAIKnowledgeCDokumente": "Create AI Knowledge-Document Link",
|
||||
"CAIKnowledgeCDokumente": "AI Knowledge-Document Link"
|
||||
},
|
||||
"fields": {
|
||||
"cAIKnowledge": "AI Knowledge",
|
||||
"cAIKnowledgeId": "AI Knowledge ID",
|
||||
"cDokumente": "Document",
|
||||
"cDokumenteId": "Document ID",
|
||||
"aiDocumentId": "AI Document ID",
|
||||
"syncstatus": "Sync Status",
|
||||
"lastSync": "Last Sync"
|
||||
},
|
||||
"options": {
|
||||
"syncstatus": {
|
||||
"new": "New",
|
||||
"unclean": "Unclean",
|
||||
"synced": "Synced",
|
||||
"failed": "Failed"
|
||||
}
|
||||
},
|
||||
"tooltips": {
|
||||
"aiDocumentId": "External AI document reference ID",
|
||||
"syncstatus": "Synchronization status with external AI system",
|
||||
"lastSync": "Timestamp of last successful synchronization"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
{
|
||||
"fields": {
|
||||
"id": {
|
||||
"type": "id",
|
||||
"dbType": "bigint",
|
||||
"autoincrement": true
|
||||
},
|
||||
"cAIKnowledge": {
|
||||
"type": "link"
|
||||
},
|
||||
"cAIKnowledgeId": {
|
||||
"type": "varchar",
|
||||
"len": 17,
|
||||
"index": true
|
||||
},
|
||||
"cDokumente": {
|
||||
"type": "link"
|
||||
},
|
||||
"cDokumenteId": {
|
||||
"type": "varchar",
|
||||
"len": 17,
|
||||
"index": true
|
||||
},
|
||||
"aiDocumentId": {
|
||||
"type": "varchar",
|
||||
"len": 255,
|
||||
"isCustom": true,
|
||||
"tooltip": true
|
||||
},
|
||||
"syncstatus": {
|
||||
"type": "enum",
|
||||
"required": false,
|
||||
"options": [
|
||||
"new",
|
||||
"unclean",
|
||||
"synced",
|
||||
"failed"
|
||||
],
|
||||
"style": {
|
||||
"new": "info",
|
||||
"unclean": "warning",
|
||||
"synced": "success",
|
||||
"failed": "danger"
|
||||
},
|
||||
"default": "new",
|
||||
"isCustom": true,
|
||||
"tooltip": true
|
||||
},
|
||||
"lastSync": {
|
||||
"type": "datetime",
|
||||
"required": false,
|
||||
"isCustom": true,
|
||||
"tooltip": true
|
||||
},
|
||||
"deleted": {
|
||||
"type": "bool",
|
||||
"default": false
|
||||
}
|
||||
},
|
||||
"links": {
|
||||
"cAIKnowledge": {
|
||||
"type": "belongsTo",
|
||||
"entity": "CAIKnowledge"
|
||||
},
|
||||
"cDokumente": {
|
||||
"type": "belongsTo",
|
||||
"entity": "CDokumente"
|
||||
}
|
||||
},
|
||||
"collection": {
|
||||
"orderBy": "id",
|
||||
"order": "desc"
|
||||
},
|
||||
"indexes": {
|
||||
"cAIKnowledgeId": {
|
||||
"columns": ["cAIKnowledgeId"]
|
||||
},
|
||||
"cDokumenteId": {
|
||||
"columns": ["cDokumenteId"]
|
||||
},
|
||||
"syncstatus": {
|
||||
"columns": ["syncstatus"]
|
||||
},
|
||||
"uniqueRelation": {
|
||||
"type": "unique",
|
||||
"columns": ["cAIKnowledgeId", "cDokumenteId", "deleted"]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"entity": true,
|
||||
"type": "Base",
|
||||
"module": "Custom",
|
||||
"object": true,
|
||||
"isCustom": true,
|
||||
"tab": false,
|
||||
"acl": true,
|
||||
"disabled": false
|
||||
}
|
||||
14
custom/Espo/Custom/Services/CAIKnowledgeCDokumente.php
Normal file
14
custom/Espo/Custom/Services/CAIKnowledgeCDokumente.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
namespace Espo\Custom\Services;
|
||||
|
||||
use Espo\Services\Record;
|
||||
|
||||
/**
|
||||
* Junction Service: CAIKnowledge ↔ CDokumente
|
||||
*
|
||||
* Handles business logic for the junction table.
|
||||
*/
|
||||
class CAIKnowledgeCDokumente extends Record
|
||||
{
|
||||
// Standard CRUD logic inherited from Record service
|
||||
}
|
||||
Reference in New Issue
Block a user