mixr-api/api_v1/mood/model.py

21 lines
652 B
Python
Raw Permalink Normal View History

2024-02-29 00:05:41 +01:00
import uuid
from django.db import models
from colorfield.fields import ColorField
class Mood(models.Model):
mood_id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
name = models.CharField(max_length=30)
description = models.CharField(max_length=150, blank=False, null=False)
color = ColorField(format='hex')
is_available = models.BooleanField(default=True) # Is available to go
is_reliable = models.BooleanField(default=True) # Will always do the same in this mood
is_going = models.BooleanField(default=False) # Is going to the cafeteria
def __str__(self):
return self.name