from typing import Optional

from app.{{ name }}.application.services.{{ name }}_service import {{ pascal_case }}Service
from app.{{ name }}.domain.entities.{{ name }} import {{ pascal_case }}

class Get{{ pascal_case }}ById:
    def __init__(self, service: {{ pascal_case }}Service):
        self.service = service

    def execute(self, id: str) -> Optional[{{ pascal_case }}]:
        return self.service.search(id)