40 lines
1.3 KiB
Python
40 lines
1.3 KiB
Python
from django.utils.translation import gettext_lazy
|
|
|
|
from django.db import models
|
|
|
|
|
|
class RotationType(models.IntegerChoices):
|
|
TIME = 0, gettext_lazy('Time')
|
|
SIZE = 1, gettext_lazy('Size')
|
|
DISABLED = 2, gettext_lazy('Disabled')
|
|
|
|
|
|
class Period(models.TextChoices):
|
|
DAY = 'day', gettext_lazy('Day')
|
|
WEEK = 'week', gettext_lazy('Week')
|
|
MONTH = 'month', gettext_lazy('Month')
|
|
|
|
|
|
class WeekDay(models.TextChoices):
|
|
SUNDAY = 'sunday', gettext_lazy('Sunday')
|
|
MONDAY = 'monday', gettext_lazy('Monday')
|
|
TUESDAY = 'tuesday', gettext_lazy('Tuesday')
|
|
WEDNESDAY = 'wednesday', gettext_lazy('Wednesday')
|
|
THURSDAY = 'thursday', gettext_lazy('Thursday')
|
|
FRIDAY = 'friday', gettext_lazy('Friday')
|
|
SATURDAY = 'saturday', gettext_lazy('Saturday')
|
|
|
|
|
|
class Month(models.TextChoices):
|
|
JANUARY = 'january', gettext_lazy('January')
|
|
FEBRUARY = 'february', gettext_lazy('February')
|
|
MARCH = 'march', gettext_lazy('March')
|
|
APRIL = 'april', gettext_lazy('April')
|
|
MAY = 'may', gettext_lazy('May')
|
|
JUNE = 'june', gettext_lazy('June')
|
|
JULY = 'july', gettext_lazy('July')
|
|
AUGUST = 'august', gettext_lazy('August')
|
|
SEPTEMBER = 'september', gettext_lazy('September')
|
|
OCTOBER = 'october', gettext_lazy('October')
|
|
NOVEMBER = 'november', gettext_lazy('November')
|
|
DECEMBER = 'december', gettext_lazy('December')
|