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:
parent
92dce08d1c
commit
e1cb99f2d1
7 changed files with 101 additions and 7 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue