kind of a mess lol but file caching and front end

This commit is contained in:
2025-04-17 13:28:49 -04:00
parent 21408af48c
commit 8f35cedb4a
45 changed files with 1435 additions and 1316 deletions

26
app/models/__init__.py Normal file
View File

@ -0,0 +1,26 @@
from app.models.box import Box
from app.models.card import Card
from app.models.file import File
from app.models.game import Game
from app.models.inventory import Inventory
from app.models.mtgjson_card import MTGJSONCard
from app.models.mtgjson_sku import MTGJSONSKU
from app.models.tcgplayer_category import TCGPlayerCategory
from app.models.tcgplayer_group import TCGPlayerGroup
from app.models.tcgplayer_order import TCGPlayerOrder
from app.models.tcgplayer_product import TCGPlayerProduct
# This makes all models available for Alembic to discover
__all__ = [
'Box',
'Card',
'File',
'Game',
'Inventory',
'MTGJSONCard',
'MTGJSONSKU',
'TCGPlayerCategory',
'TCGPlayerGroup',
'TCGPlayerOrder',
'TCGPlayerProduct'
]

View File

@ -1,7 +1,7 @@
from pydantic import BaseModel, ConfigDict
from typing import List, Optional
from datetime import datetime
from sqlalchemy import Column, Integer, String, DateTime
from sqlalchemy import Column, Integer, String, DateTime, JSON
from sqlalchemy.orm import relationship
from sqlalchemy.sql import func
from app.db.database import Base
@ -12,7 +12,10 @@ class File(Base):
id = Column(Integer, primary_key=True, index=True)
name = Column(String)
type = Column(String)
file_type = Column(String)
content_type = Column(String)
path = Column(String)
size = Column(Integer) # File size in bytes
file_metadata = Column(JSON)
created_at = Column(DateTime(timezone=True), server_default=func.now())
updated_at = Column(DateTime(timezone=True), onupdate=func.now())