# Path: sfm/ui/utils.py
# def collection_path(collection, sfm_data_dir=None):
#     return collection_path_by_id(collection.collection_set.collection_set_id, collection.collection_id,
#                                  sfm_data_dir=sfm_data_dir)
# 
# def collection_set_path(collection_set, sfm_data_dir=None):
#     return collection_set_path_by_id(collection_set.collection_set_id, sfm_data_dir=sfm_data_dir)


from django.contrib.auth.models import AbstractUser, Group
from django.db import models
from django.utils import timezone
from jsonfield import JSONField
from simple_history.models import HistoricalRecords
from django.conf import settings
from django.db.models import F, Func, Value
from .utils import collection_path as get_collection_path, collection_set_path as get_collection_set_path
import django.db.models.options as options
import uuid
import datetime
import logging
import json
import os
import shutil



log = logging.getLogger(__name__)

# This adds an additional meta field
options.DEFAULT_NAMES = options.DEFAULT_NAMES + (u'diff_fields',)


def default_uuid():
    return uuid.uuid4().hex


class User(AbstractUser):
    DAILY = "daily"
    WEEKLY = "weekly"
    MONTHLY = "monthly"
    NONE = "none"
    EMAIL_FREQUENCY_CHOICES = [
        (DAILY, 'Daily'),
        (WEEKLY, 'Weekly'),
        (MONTHLY, 'Monthly'),

# Path: sfm/ui/utils.py
# def collection_path(collection, sfm_data_dir=None):
#     return collection_path_by_id(collection.collection_set.collection_set_id, collection.collection_id,
#                                  sfm_data_dir=sfm_data_dir)
# 
# def collection_set_path(collection_set, sfm_data_dir=None):
#     return collection_set_path_by_id(collection_set.collection_set_id, sfm_data_dir=sfm_data_dir)


# Path: sfm/ui/models.py
from django.contrib.auth.models import AbstractUser, Group
from django.db import models
from django.utils import timezone
from jsonfield import JSONField
from simple_history.models import HistoricalRecords
from django.conf import settings
from django.db.models import F, Func, Value
from .utils import collection_path as get_collection_path, collection_set_path as get_collection_set_path
import django.db.models.options as options
import uuid
import datetime
import logging
import json
import os
import shutil




log = logging.getLogger(__name__)

# This adds an additional meta field
options.DEFAULT_NAMES = options.DEFAULT_NAMES + (u'diff_fields',)


def default_uuid():
    return uuid.uuid4().hex


class User(AbstractUser):
    DAILY = "daily"
    WEEKLY = "weekly"
    MONTHLY = "monthly"
    NONE = "none"
    EMAIL_FREQUENCY_CHOICES = [
        (DAILY, 'Daily'),
        (WEEKLY, 'Weekly'),
        (MONTHLY, 'Monthly'),

        (NONE, "None")