from django.db import models


class PuzzlePointsFactor(models.Model):
    # Timestamps
    created_at = models.DateTimeField(auto_now_add=True)
    updated_at = models.DateTimeField(auto_now=True)

    cost = models.IntegerField()
    cycles = models.IntegerField()
    area = models.IntegerField()

    special_notes = models.TextField(blank=True)

    def __str__(self) -> str:
        return f"{self.cost} - {self.cycles} - {self.area}"


class PuzzlePointsValue(models.Model):
    # Timestamps
    created_at = models.DateTimeField(auto_now_add=True)
    updated_at = models.DateTimeField(auto_now=True)

    points = models.JSONField(default=list)
