This repository has been archived by the owner on Sep 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from SELab-2/modellen_naar_pydantic
Modellen naar pydantic
- Loading branch information
Showing
12 changed files
with
18 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
from dataclasses import dataclass | ||
|
||
from domain.models.base_model import JsonRepresentable | ||
from pydantic import BaseModel | ||
|
||
|
||
@dataclass() | ||
class GroupDataclass(JsonRepresentable): | ||
class GroupDataclass(BaseModel): | ||
id: int | ||
project_id: int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
from dataclasses import dataclass | ||
from datetime import datetime | ||
|
||
from domain.models.base_model import JsonRepresentable | ||
from pydantic import BaseModel, PositiveInt | ||
|
||
|
||
@dataclass() | ||
class ProjectDataclass(JsonRepresentable): | ||
class ProjectDataclass(BaseModel): | ||
id: int | ||
name: str | ||
deadline: datetime | ||
archived: bool | ||
description: str | ||
requirements: str | ||
visible: bool | ||
max_students: int | ||
max_students: PositiveInt | ||
subject_id: int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
from dataclasses import dataclass | ||
|
||
from domain.models.base_model import JsonRepresentable | ||
from pydantic import BaseModel | ||
|
||
|
||
@dataclass() | ||
class SubjectDataclass(JsonRepresentable): | ||
class SubjectDataclass(BaseModel): | ||
id: int | ||
name: str |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
from dataclasses import dataclass | ||
|
||
from domain.models.base_model import JsonRepresentable | ||
from pydantic import BaseModel, EmailStr | ||
|
||
|
||
@dataclass() | ||
class UserDataclass(JsonRepresentable): | ||
class UserDataclass(BaseModel): | ||
id: int | ||
name: str | ||
email: str | ||
email: EmailStr |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters