business-card-site/API/app/domain/models/profile_photos.py

14 lines
427 B
Python

from sqlalchemy import Column, String, Integer, ForeignKey
from sqlalchemy.orm import relationship
from app.domain.models.base import AdvancedBaseModel
class ProfilePhoto(AdvancedBaseModel):
__tablename__ = 'profile_photos'
file_path = Column(String, nullable=False)
profile_id = Column(Integer, ForeignKey('profiles.id'), nullable=False)
profile = relationship('Profile', back_populates='profile_photos')