Made some changes to naming in both the classes and the tables of the database to conform the correct naming scheme

This commit is contained in:
Gustavo Henrique Santos Souza de Miranda
2025-06-05 19:59:43 -03:00
parent 7e29a590a2
commit 32b8a58c3a
9 changed files with 38 additions and 28 deletions
+3 -3
View File
@@ -8,17 +8,18 @@ from ..database import Base
class Photo(Base):
__tablename__ = "photo"
__tablename__ = "photos"
id = Column(Integer, primary_key=True)
filepath = Column(String)
name = Column(String)
addition_date = Column(String)
caption = Column(String)
entries:relationship = relationship(
entries = relationship(
"Entry",
secondary=photo_entry_association,
back_populates="photos"
)
def __init__(self, filepath, name, addition_date=None, caption=None, entries=None, **kw: Any):
super().__init__(**kw)
self.filepath = filepath
@@ -26,4 +27,3 @@ class Photo(Base):
self.addition_date = addition_date
self.caption = caption
self.entries = entries