muryshev's picture
init
57cf043
raw
history blame
483 Bytes
from sqlalchemy import (
ForeignKey,
Integer,
String,
)
from sqlalchemy.orm import mapped_column, relationship
from components.dbo.models.base import Base
class Acronym(Base):
__tablename__ = "acronym"
short_form = mapped_column(String)
full_form = mapped_column(String)
type = mapped_column(String)
document_id = mapped_column(Integer, ForeignKey('document.id'), nullable=True)
document = relationship("Document", back_populates="acronyms")