OneBot: Leantime 改造版源码(BOM/Univer 表格/AI 接管/品牌替换等)

This commit is contained in:
wangruiguo
2026-09-03 18:49:20 +08:00
commit d647428529
3501 changed files with 1988906 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
<?php
namespace Leantime\Core\Support;
/**
* Interface for entity formatters that convert domain models into markdown for AI consumption.
*
* This interface defines the contract for formatting domain entities (tickets, projects, users, etc.)
* into structured markdown documents suitable for AI prompts and embeddings.
*/
interface EntityFormatterInterface
{
/**
* Format the entity into a standard markdown representation.
*
* @return string Markdown formatted string representing the entity
*/
public function format(): string;
/**
* Format the entity with additional context-aware information.
*
* @param array $context Additional context that might affect formatting (e.g., user preferences, specific fields to include/exclude)
* @return string Context-aware markdown formatted string
*/
public function formatForContext(array $context = []): string;
/**
* Get the type of entity this formatter handles.
*
* @return string Entity type (e.g., 'ticket', 'project', 'user')
*/
public function getEntityType(): string;
/**
* Get the unique identifier of the entity being formatted.
*
* @return mixed Entity ID (could be int, string, or other identifier type)
*/
public function getEntityId(): mixed;
/**
* Get a compact, one-line summary of the entity.
*
* @return string Brief summary suitable for lists or references
*/
public function getSummary(): string;
}