Skip to content

Commit

Permalink
feat: add abstract QuestionnaireRepository
Browse files Browse the repository at this point in the history
  • Loading branch information
Mala1180 committed Apr 17, 2024
1 parent c9c12a0 commit c630aa5
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions app/domain/repositories/QuestionnaireRepository.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
from abc import ABC, abstractmethod
from typing import List

from app.domain.core import ProjectId, Question, QuestionId


class QuestionnaireRepository(ABC):

def __init__(self, project_id: ProjectId):
self.project_id = project_id

@abstractmethod
def get_questionnaire(self) -> List[Question]:
pass

@abstractmethod
def insert_question(self, question: Question) -> bool:
pass

@abstractmethod
def update_question(self, question_id: QuestionId, question: Question) -> bool:
pass

@abstractmethod
def delete_question(self, question_id: QuestionId) -> Question:
pass

0 comments on commit c630aa5

Please sign in to comment.