62 lines
1.8 KiB
Python
62 lines
1.8 KiB
Python
from abc import ABC, abstractmethod
|
|
from fastapi import UploadFile
|
|
|
|
from fastapi_modules.fastapi_leaudit.domian.Dto.contractTemplateDto import (
|
|
ContractTemplateCreateDTO,
|
|
ContractTemplateListQueryDTO,
|
|
ContractTemplateSearchQueryDTO,
|
|
ContractTemplateUpdateDTO,
|
|
)
|
|
from fastapi_modules.fastapi_leaudit.domian.vo.contractTemplateVo import (
|
|
ContractTemplateCategoryVO,
|
|
ContractTemplateCreateVO,
|
|
ContractTemplateDetailVO,
|
|
ContractTemplatePageVO,
|
|
ContractTemplateSearchResultVO,
|
|
)
|
|
|
|
|
|
class IContractTemplateService(ABC):
|
|
"""合同模板服务接口。"""
|
|
|
|
@abstractmethod
|
|
async def ListCategories(self, IncludeDisabled: bool, WithTemplateCount: bool) -> list[ContractTemplateCategoryVO]:
|
|
...
|
|
|
|
@abstractmethod
|
|
async def ListTemplates(self, Query: ContractTemplateListQueryDTO, CurrentUserId: int) -> ContractTemplatePageVO:
|
|
...
|
|
|
|
@abstractmethod
|
|
async def SearchTemplates(self, Query: ContractTemplateSearchQueryDTO, CurrentUserId: int) -> ContractTemplateSearchResultVO:
|
|
...
|
|
|
|
@abstractmethod
|
|
async def GetTemplateDetail(self, TemplateId: int, CurrentUserId: int) -> ContractTemplateDetailVO | None:
|
|
...
|
|
|
|
@abstractmethod
|
|
async def CreateTemplate(
|
|
self,
|
|
Body: ContractTemplateCreateDTO,
|
|
File: UploadFile,
|
|
PdfFile: UploadFile | None,
|
|
CurrentUserId: int,
|
|
) -> ContractTemplateCreateVO:
|
|
...
|
|
|
|
@abstractmethod
|
|
async def UpdateTemplate(
|
|
self,
|
|
TemplateId: int,
|
|
Body: ContractTemplateUpdateDTO,
|
|
File: UploadFile,
|
|
PdfFile: UploadFile | None,
|
|
CurrentUserId: int,
|
|
) -> ContractTemplateCreateVO:
|
|
...
|
|
|
|
@abstractmethod
|
|
async def DeleteTemplate(self, TemplateId: int, CurrentUserId: int) -> None:
|
|
...
|