Implement PhotoAttachable interface in Inventory, User, and WorkLog models; add photo upload API endpoint with file handling and attachment logic.

This commit is contained in:
Yaro Kasear 2025-07-11 09:21:31 -05:00
parent 92dce08d1c
commit e1cb99f2d1
7 changed files with 101 additions and 7 deletions

View file

@ -9,8 +9,9 @@ from sqlalchemy import Boolean, ForeignKey, Identity, Integer, Unicode, text
from sqlalchemy.orm import Mapped, mapped_column, relationship
from . import db
from .photo import PhotoAttachable
class User(db.Model):
class User(db.Model, PhotoAttachable):
__tablename__ = 'users'
id: Mapped[int] = mapped_column(Integer, Identity(start=1, increment=1), primary_key=True)