|
@@ -6,13 +6,16 @@ from django.contrib.contenttypes.models import ContentType
|
|
|
from core.graphql.mixins import ChangelogMixin
|
|
from core.graphql.mixins import ChangelogMixin
|
|
|
from core.models import ObjectType as ObjectType_
|
|
from core.models import ObjectType as ObjectType_
|
|
|
from extras.graphql.mixins import CustomFieldsMixin, JournalEntriesMixin, TagsMixin
|
|
from extras.graphql.mixins import CustomFieldsMixin, JournalEntriesMixin, TagsMixin
|
|
|
|
|
+from users.graphql.mixins import OwnerMixin
|
|
|
|
|
|
|
|
__all__ = (
|
|
__all__ = (
|
|
|
'BaseObjectTypeV1',
|
|
'BaseObjectTypeV1',
|
|
|
'ContentTypeTypeV1',
|
|
'ContentTypeTypeV1',
|
|
|
|
|
+ 'NestedGroupObjectTypeV1',
|
|
|
|
|
+ 'NetBoxObjectTypeV1',
|
|
|
'ObjectTypeV1',
|
|
'ObjectTypeV1',
|
|
|
'OrganizationalObjectTypeV1',
|
|
'OrganizationalObjectTypeV1',
|
|
|
- 'NetBoxObjectTypeV1',
|
|
|
|
|
|
|
+ 'PrimaryObjectTypeV1',
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
@@ -53,10 +56,26 @@ class ObjectTypeV1(
|
|
|
pass
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+class PrimaryObjectTypeV1(
|
|
|
|
|
+ ChangelogMixin,
|
|
|
|
|
+ CustomFieldsMixin,
|
|
|
|
|
+ JournalEntriesMixin,
|
|
|
|
|
+ TagsMixin,
|
|
|
|
|
+ OwnerMixin,
|
|
|
|
|
+ BaseObjectTypeV1
|
|
|
|
|
+):
|
|
|
|
|
+ """
|
|
|
|
|
+ Base GraphQL type for models which inherit from PrimaryModel.
|
|
|
|
|
+ """
|
|
|
|
|
+ pass
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
class OrganizationalObjectTypeV1(
|
|
class OrganizationalObjectTypeV1(
|
|
|
ChangelogMixin,
|
|
ChangelogMixin,
|
|
|
CustomFieldsMixin,
|
|
CustomFieldsMixin,
|
|
|
|
|
+ JournalEntriesMixin,
|
|
|
TagsMixin,
|
|
TagsMixin,
|
|
|
|
|
+ OwnerMixin,
|
|
|
BaseObjectTypeV1
|
|
BaseObjectTypeV1
|
|
|
):
|
|
):
|
|
|
"""
|
|
"""
|
|
@@ -65,6 +84,20 @@ class OrganizationalObjectTypeV1(
|
|
|
pass
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+class NestedGroupObjectTypeV1(
|
|
|
|
|
+ ChangelogMixin,
|
|
|
|
|
+ CustomFieldsMixin,
|
|
|
|
|
+ JournalEntriesMixin,
|
|
|
|
|
+ TagsMixin,
|
|
|
|
|
+ OwnerMixin,
|
|
|
|
|
+ BaseObjectTypeV1
|
|
|
|
|
+):
|
|
|
|
|
+ """
|
|
|
|
|
+ Base GraphQL type for models which inherit from NestedGroupModel.
|
|
|
|
|
+ """
|
|
|
|
|
+ pass
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
class NetBoxObjectTypeV1(
|
|
class NetBoxObjectTypeV1(
|
|
|
ChangelogMixin,
|
|
ChangelogMixin,
|
|
|
CustomFieldsMixin,
|
|
CustomFieldsMixin,
|