# Path: isserviceup/models/favorite.py
# class Favorite(Document):
#     meta = {
#         'indexes': [
#             {'fields': ('user_id',) },
#             {'fields': ('service_id',) },
#             {'fields': ('user_id', 'service_id'), 'unique': True}
#         ]
#     }
# 
#     user_id = StringField(required=True)
#     service_id = StringField(required=True)
#     timestamp = DateTimeField(default=datetime.datetime.now)
# 
#     monitored_status = ListField(default=None)
#     slack_webhook = URLField(default=None)
# 
# Path: isserviceup/services/models/service.py
# class Status(Enum):
#     ok = 1              # green
#     maintenance = 2     # blue
#     minor = 3           # yellow
#     major = 4           # orange
#     critical = 5        # red
#     unavailable = 6     # gray


import datetime
from mongoengine import StringField, Document, DateTimeField, BooleanField, ListField, URLField
from isserviceup.models.favorite import Favorite
from isserviceup.services.models.service import Status


DEFAULT_MONITORED_STATUS = [
    Status.ok.name,
    Status.major.name,

# Path: isserviceup/models/favorite.py
# class Favorite(Document):
#     meta = {
#         'indexes': [
#             {'fields': ('user_id',) },
#             {'fields': ('service_id',) },
#             {'fields': ('user_id', 'service_id'), 'unique': True}
#         ]
#     }
# 
#     user_id = StringField(required=True)
#     service_id = StringField(required=True)
#     timestamp = DateTimeField(default=datetime.datetime.now)
# 
#     monitored_status = ListField(default=None)
#     slack_webhook = URLField(default=None)
# 
# Path: isserviceup/services/models/service.py
# class Status(Enum):
#     ok = 1              # green
#     maintenance = 2     # blue
#     minor = 3           # yellow
#     major = 4           # orange
#     critical = 5        # red
#     unavailable = 6     # gray


# Path: isserviceup/models/user.py
import datetime
from mongoengine import StringField, Document, DateTimeField, BooleanField, ListField, URLField
from isserviceup.models.favorite import Favorite
from isserviceup.services.models.service import Status



DEFAULT_MONITORED_STATUS = [
    Status.ok.name,
    Status.major.name,

    Status.critical.name