Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/example/note/use_case.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
from .repository import NoteRepositoryInterface


@dataclass(frozen=True)
@dataclass(frozen=True, slots=True)
class ListNotesInput:
limit: int
offset: int


@dataclass(frozen=True)
@dataclass(frozen=True, slots=True)
class ListNotesOutput:
items: list[Note]
limit: int
Expand All @@ -36,7 +36,7 @@ def execute(self, input_: ListNotesInput) -> ListNotesOutput:
)


@dataclass(frozen=True)
@dataclass(frozen=True, slots=True)
class CreateNoteInput:
title: str
body: str
Expand All @@ -61,7 +61,7 @@ def execute(self, note_id: int) -> Note:
return note


@dataclass(frozen=True)
@dataclass(frozen=True, slots=True)
class UpdateNoteInput:
note_id: int
title: str
Expand All @@ -79,7 +79,7 @@ def execute(self, input_: UpdateNoteInput) -> Note:
return note


@dataclass(frozen=True)
@dataclass(frozen=True, slots=True)
class DeleteNoteInput:
note_id: int

Expand Down
10 changes: 5 additions & 5 deletions src/example/tag/use_case.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
from .repository import TagRepositoryInterface


@dataclass(frozen=True)
@dataclass(frozen=True, slots=True)
class ListTagsInput:
limit: int
offset: int


@dataclass(frozen=True)
@dataclass(frozen=True, slots=True)
class ListTagsOutput:
items: list[Tag]
limit: int
Expand Down Expand Up @@ -47,7 +47,7 @@ def execute(self, tag_id: int) -> Tag:
return tag


@dataclass(frozen=True)
@dataclass(frozen=True, slots=True)
class CreateTagInput:
name: str

Expand All @@ -60,7 +60,7 @@ def execute(self, input_: CreateTagInput) -> Tag:
return self._repository.save(input_.name)


@dataclass(frozen=True)
@dataclass(frozen=True, slots=True)
class UpdateTagInput:
tag_id: int
name: str
Expand All @@ -77,7 +77,7 @@ def execute(self, input_: UpdateTagInput) -> Tag:
return tag


@dataclass(frozen=True)
@dataclass(frozen=True, slots=True)
class DeleteTagInput:
tag_id: int

Expand Down
Loading