mirror of
https://github.com/netbox-community/netbox.git
synced 2025-12-15 04:49:36 -06:00
Integrate Owner and JournalEntries fields
This commit is contained in:
parent
3e1ccc80e9
commit
ebeceaaa21
@ -52,4 +52,5 @@ LOGGING = {
|
|||||||
'disable_existing_loggers': True
|
'disable_existing_loggers': True
|
||||||
}
|
}
|
||||||
|
|
||||||
GRAPHQL_DEFAULT_VERSION = 2
|
# TODO: Switch to 2
|
||||||
|
GRAPHQL_DEFAULT_VERSION = 1
|
||||||
|
|||||||
@ -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,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user