# Path: boardinghouse/base.py
# class SharedSchemaModel(SharedSchemaMixin, models.Model):
#     """
#     A Base class for models that should be in the shared schema.
# 
#     You should inherit from this class if your model _must_ be in
#     the shared schema. Just setting the `_is_shared_model` attribute
#     will not be picked up for migrations.
#     """
# 
#     class Meta:
#         abstract = True
# 
# class MultiSchemaManager(MultiSchemaMixin, models.Manager):
#     """
#     A Manager that allows for fetching objects from multiple schemata
#     in the one request.
#     """


from django.db import models
from django.contrib.auth.models import User  # NOQA
from boardinghouse.base import SharedSchemaModel, MultiSchemaManager



class AwareModel(models.Model):
    name = models.CharField(max_length=10, unique=True)
    status = models.BooleanField(default=False)
    factor = models.PositiveSmallIntegerField(default=7)

    objects = MultiSchemaManager()


class NaiveModel(SharedSchemaModel):
    name = models.CharField(max_length=10, unique=True)
    status = models.BooleanField(default=False)


# The existence of this model, although it may not have tests
# that apply to it, is enough to trigger infinite recursion if
# a check for self-referencing models is not made in is_shared_model()
class SelfReferentialModel(models.Model):
    name = models.CharField(max_length=10, unique=True)

# Path: boardinghouse/base.py
# class SharedSchemaModel(SharedSchemaMixin, models.Model):
#     """
#     A Base class for models that should be in the shared schema.
# 
#     You should inherit from this class if your model _must_ be in
#     the shared schema. Just setting the `_is_shared_model` attribute
#     will not be picked up for migrations.
#     """
# 
#     class Meta:
#         abstract = True
# 
# class MultiSchemaManager(MultiSchemaMixin, models.Manager):
#     """
#     A Manager that allows for fetching objects from multiple schemata
#     in the one request.
#     """


# Path: tests/models.py
from django.db import models
from django.contrib.auth.models import User  # NOQA
from boardinghouse.base import SharedSchemaModel, MultiSchemaManager




class AwareModel(models.Model):
    name = models.CharField(max_length=10, unique=True)
    status = models.BooleanField(default=False)
    factor = models.PositiveSmallIntegerField(default=7)

    objects = MultiSchemaManager()


class NaiveModel(SharedSchemaModel):
    name = models.CharField(max_length=10, unique=True)
    status = models.BooleanField(default=False)


# The existence of this model, although it may not have tests
# that apply to it, is enough to trigger infinite recursion if
# a check for self-referencing models is not made in is_shared_model()
class SelfReferentialModel(models.Model):
    name = models.CharField(max_length=10, unique=True)

    parent = models.ForeignKey('tests.SelfReferentialModel',