criação inicial do corpo do projeto
This commit is contained in:
20
app/models/game.py
Normal file
20
app/models/game.py
Normal 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)
|
||||
Reference in New Issue
Block a user