Changed the names of the files to conform the python convection and also added photo_in_entry.py to diminish the cyclic import error in pylint

This commit is contained in:
Gustavo Henrique Santos Souza de Miranda
2025-06-04 00:13:18 -03:00
parent 89e6d0a783
commit ac29e84833
11 changed files with 66 additions and 45 deletions
+18
View File
@@ -0,0 +1,18 @@
from sqlalchemy import Column, Integer, String, ForeignKey
from sqlalchemy.orm import relationship
from pilgrim.models.photo_in_entry import photo_entry_association
from ..database import Base
class Entry(Base):
__tablename__ = "Entry"
id = Column(Integer, primary_key=True)
title = Column(String)
text = Column(String)
date = Column(String)
photos = relationship(
"Photo",
secondary=photo_entry_association,
back_populates="entries")
fk_TravelDiary_id = Column(Integer, ForeignKey("TravelDiary.id"))