update entity/repostitory/service

This commit is contained in:
phernandez
2025-01-06 18:57:04 -06:00
parent fb330fe745
commit ea359d2484
10 changed files with 115 additions and 253 deletions
+1 -5
View File
@@ -15,6 +15,7 @@ def entity_model(entity: EntitySchema):
model = EntityModel(
name=entity.name,
entity_type=entity.entity_type,
entity_metadata=entity.entity_metadata,
path_id=entity.path_id,
file_path=entity.file_path,
description=entity.description,
@@ -29,11 +30,6 @@ class EntityService(BaseService[EntityModel]):
def __init__(self, entity_repository: EntityRepository):
super().__init__(entity_repository)
async def search(self, query: str) -> Sequence[EntityModel]:
"""Search entities using LIKE pattern matching."""
logger.debug(f"Searching entities with query: {query}")
return await self.repository.search(query)
async def create_entity(self, entity: EntitySchema) -> EntityModel:
"""Create a new entity in the database."""
logger.debug(f"Creating entity in DB: {entity}")