mfss-positioning/app/apps/workers/models/model_workshift.py
2025-03-12 17:14:27 +07:00

22 lines
702 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

from django.db import models
class WorkShift(models.Model):
"""Модель смены."""
name = models.CharField(max_length=128, verbose_name="Наименование")
is_weekday = models.BooleanField(default=False, verbose_name="В будние дни")
is_everyday = (models.BooleanField(default=False, verbose_name="Каждый день"),)
active = models.BooleanField(default=True, verbose_name="Активная")
class Meta:
ordering = ("name",)
verbose_name = "смена"
verbose_name_plural = "смены"
indexes = [
models.Index(fields=["name"]),
]
def __str__(self) -> str:
return self.name