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 -5
View File
@@ -8,7 +8,7 @@ from ..database import Base
class Entry(Base):
__tablename__ = "Entry"
__tablename__ = "entries"
id = Column(Integer, primary_key=True)
title = Column(String)
text = Column(String)
@@ -17,12 +17,10 @@ class Entry(Base):
"Photo",
secondary=photo_entry_association,
back_populates="entries")
fk_TravelDiary_id = Column(Integer, ForeignKey("TravelDiary.id"))
fk_travel_diary_id = Column(Integer, ForeignKey("travel_diaries.id"))
def __init__(self, title: str, text: str, date: str, travel_diary_id: int, **kw: Any):
super().__init__(**kw)
self.title = title
self.text = text
self.date = date
self.fk_TravelDiary_id = travel_diary_id
self.fk_travel_diary_id = travel_diary_id