Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Commit

Permalink
Make id attribute mandatory
Browse files Browse the repository at this point in the history
  • Loading branch information
msathieu committed Feb 25, 2024
1 parent a016bd4 commit 659d370
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion backend/domain/models/GroupDataclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@

@dataclass()
class GroupDataclass(JsonRepresentable):
id: int
project_id: int
id: int | None = None
2 changes: 1 addition & 1 deletion backend/domain/models/ProjectDataclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

@dataclass()
class ProjectDataclass(JsonRepresentable):
id: int
name: str
deadline: datetime
archived: bool
requirements: str
visible: bool
max_students: int
subject_id: int
id: int | None = None
2 changes: 1 addition & 1 deletion backend/domain/models/SubjectDataclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@

@dataclass()
class SubjectDataclass(JsonRepresentable):
id: int
name: str
id: int | None = None
2 changes: 1 addition & 1 deletion backend/domain/models/SubmissionDataclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ class SubmissionState(enum.Enum):

@dataclass()
class SubmissionDataclass(JsonRepresentable):
id: int
date_time: datetime
group_id: int
student_id: int
state: SubmissionState
message: str
id: int | None = None
2 changes: 1 addition & 1 deletion backend/domain/models/UserDataclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@

@dataclass()
class UserDataclass(JsonRepresentable):
id: int
name: str
email: str
id: int | None = None

0 comments on commit 659d370

Please sign in to comment.