criação inicial do corpo do projeto

This commit is contained in:
2026-05-18 17:54:09 -05:00
commit 7669a1c77b
12 changed files with 292 additions and 0 deletions

20
app/models/game.py Normal file
View File

@@ -0,0 +1,20 @@
from sqlalchemy import Column, String, Boolean, JSON
from app.db.database import Base
import uuid
class Game(Base):
__tablename__ = "games"
id = Column(String, primary_key=True, default=lambda: f"gv-{uuid.uuid4().hex[:8]}")
title = Column(String, index=True, nullable=False)
slug = Column(String, unique=True, index=True, nullable=False)
description = Column(String)
developer = Column(String)
active = Column(Boolean, default=True)
# Usando JSON para simplificar arrays no MVP conforme os requisitos.
# Em um banco relacional robusto, genres e platforms seriam tabelas M:N.
genres = Column(JSON)
platforms = Column(JSON)
images = Column(JSON)
system_requirements = Column(JSON)