from django.db import models



# Create your models here.
class Meal(models.Model):
    name = models.CharField(max_length=255, unique=True)
    price_per_month = models.DecimalField(max_digits=10, decimal_places=2, help_text="How much does the meal cost?") # How much does the meal cost?
    description = models.TextField(blank=True, null=True)
    created_at = models.DateTimeField(auto_now_add=True)
    updated_at = models.DateTimeField(auto_now=True)

    def __str__(self) -> str:
        return str(self.name)

    class Meta:
        ordering = ['name']
        db_table = 'meals' # custom table name
