from django.db import models


class Game(models.Model):
    steam_app_id = models.PositiveIntegerField(unique=True)
    name = models.CharField(max_length=255)
    path = models.CharField(max_length=100)
    enabled = models.BooleanField(default=True)

    created_at = models.DateTimeField(auto_now_add=True)
    updated_at = models.DateTimeField(auto_now=True)

    class Meta:
        ordering = ["name"]

    def __str__(self) -> str:
        return f"{self.name} ({self.steam_app_id})"
