Initial
This commit is contained in:
7
service/database.py
Normal file
7
service/database.py
Normal file
@ -0,0 +1,7 @@
|
||||
from sqlalchemy.orm import DeclarativeBase
|
||||
|
||||
|
||||
class ORMBase(DeclarativeBase):
|
||||
...
|
||||
|
||||
|
||||
0
service/dto/__init__.py
Normal file
0
service/dto/__init__.py
Normal file
0
service/orm/__init__.py
Normal file
0
service/orm/__init__.py
Normal file
10
service/orm/machine.py
Normal file
10
service/orm/machine.py
Normal file
@ -0,0 +1,10 @@
|
||||
from sqlalchemy.orm import Mapped, mapped_column
|
||||
|
||||
from service.database import ORMBase
|
||||
|
||||
|
||||
class MachineORM(ORMBase):
|
||||
__tablename__ = "machines"
|
||||
|
||||
id: Mapped[int] = mapped_column(primary_key=True)
|
||||
caption: Mapped[str]
|
||||
Reference in New Issue
Block a user