from django.db import models

from intranet.femida.src.communications.choices import MESSAGE_STATUSES


class MessageQuerySet(models.QuerySet):

    def alive(self):
        return self.exclude(status__in=(MESSAGE_STATUSES.deleted, MESSAGE_STATUSES.draft))


MessageManager = models.Manager.from_queryset(MessageQuerySet)
