mirror of
https://github.com/koloideal/Quizzi.git
synced 2026-06-10 18:35:28 +03:00
Initial commit
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
from trudex.domain.schemas import Group as DomainGroup
|
||||
from trudex.infrastructure.database.models import Group as GroupModel
|
||||
|
||||
|
||||
class GroupDTO:
|
||||
def __init__(self, model: GroupModel) -> None:
|
||||
self.model: GroupModel = model
|
||||
|
||||
def to_domain(self) -> DomainGroup:
|
||||
return DomainGroup(
|
||||
id=self.model.id,
|
||||
number=self.model.number,
|
||||
created_at=self.model.created_at,
|
||||
updated_at=self.model.updated_at,
|
||||
)
|
||||
Reference in New Issue
Block a user