mirror of
https://github.com/grey-cat-1908/formaptix-server.git
synced 2024-11-11 18:57:27 +03:00
14 lines
362 B
Python
14 lines
362 B
Python
|
from sqlalchemy import JSON
|
||
|
from sqlalchemy.orm import Mapped, mapped_column, relationship
|
||
|
|
||
|
from database import Base, User
|
||
|
|
||
|
|
||
|
class Form(Base):
|
||
|
__tablename__ = "forms"
|
||
|
|
||
|
id: Mapped[int] = mapped_column(primary_key=True)
|
||
|
name: Mapped[str]
|
||
|
owner: Mapped[User] = relationship(User, cascade="all, delete")
|
||
|
data: Mapped[dict] = mapped_column(JSON)
|