35 lines
1.2 KiB
Python
35 lines
1.2 KiB
Python
from abc import ABC, abstractmethod
|
|
|
|
from fastapi_modules.fastapi_leaudit.domian.Dto.promptTemplateDto import PromptTemplateCreateDTO, PromptTemplateUpdateDTO
|
|
from fastapi_modules.fastapi_leaudit.domian.vo.promptTemplateVo import PromptTemplateListVO, PromptTemplateTypeListVO, PromptTemplateVO
|
|
|
|
|
|
class IPromptTemplateService(ABC):
|
|
@abstractmethod
|
|
async def ListTemplates(self, Search: str | None, TemplateTypes: list[str] | None, Status: int | None, Page: int, PageSize: int) -> PromptTemplateListVO:
|
|
...
|
|
|
|
@abstractmethod
|
|
async def GetTemplate(self, TemplateId: int) -> PromptTemplateVO:
|
|
...
|
|
|
|
@abstractmethod
|
|
async def CreateTemplate(self, Body: PromptTemplateCreateDTO) -> PromptTemplateVO:
|
|
...
|
|
|
|
@abstractmethod
|
|
async def UpdateTemplate(self, TemplateId: int, Body: PromptTemplateUpdateDTO) -> PromptTemplateVO:
|
|
...
|
|
|
|
@abstractmethod
|
|
async def DeleteTemplate(self, TemplateId: int) -> None:
|
|
...
|
|
|
|
@abstractmethod
|
|
async def GetTemplateTypes(self) -> PromptTemplateTypeListVO:
|
|
...
|
|
|
|
@abstractmethod
|
|
async def DuplicateTemplate(self, TemplateId: int, NewCode: str | None) -> PromptTemplateVO:
|
|
...
|