feat(project): add Project entity and ProjectRepository interface
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
c4b33850fb
commit
a4b7e1ca7a
|
|
@ -0,0 +1,11 @@
|
||||||
|
from dataclasses import dataclass
|
||||||
|
from datetime import datetime
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass
|
||||||
|
class Project:
|
||||||
|
id: str
|
||||||
|
name: str
|
||||||
|
design_dir: str
|
||||||
|
code_dir: str | None
|
||||||
|
created_at: datetime
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
from abc import ABC, abstractmethod
|
||||||
|
|
||||||
|
from app.modules.project.domain.entities import Project
|
||||||
|
|
||||||
|
|
||||||
|
class ProjectRepository(ABC):
|
||||||
|
@abstractmethod
|
||||||
|
def list_all(self) -> list[Project]:
|
||||||
|
...
|
||||||
|
|
||||||
|
@abstractmethod
|
||||||
|
def get_by_id(self, project_id: str) -> Project | None:
|
||||||
|
...
|
||||||
|
|
||||||
|
@abstractmethod
|
||||||
|
def save(self, project: Project) -> None:
|
||||||
|
...
|
||||||
|
|
||||||
|
@abstractmethod
|
||||||
|
def delete(self, project_id: str) -> None:
|
||||||
|
...
|
||||||
Loading…
Reference in New Issue
Block a user