mirror of
https://github.com/netbox-community/netbox.git
synced 2025-12-12 19:39:35 -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
|
||||
}
|
||||
|
||||
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.models import ObjectType as ObjectType_
|
||||
from extras.graphql.mixins import CustomFieldsMixin, JournalEntriesMixin, TagsMixin
|
||||
from users.graphql.mixins import OwnerMixin
|
||||
|
||||
__all__ = (
|
||||
'BaseObjectTypeV1',
|
||||
'ContentTypeTypeV1',
|
||||
'NestedGroupObjectTypeV1',
|
||||
'NetBoxObjectTypeV1',
|
||||
'ObjectTypeV1',
|
||||
'OrganizationalObjectTypeV1',
|
||||
'NetBoxObjectTypeV1',
|
||||
'PrimaryObjectTypeV1',
|
||||
)
|
||||
|
||||
|
||||
@ -53,10 +56,26 @@ class ObjectTypeV1(
|
||||
pass
|
||||
|
||||
|
||||
class PrimaryObjectTypeV1(
|
||||
ChangelogMixin,
|
||||
CustomFieldsMixin,
|
||||
JournalEntriesMixin,
|
||||
TagsMixin,
|
||||
OwnerMixin,
|
||||
BaseObjectTypeV1
|
||||
):
|
||||
"""
|
||||
Base GraphQL type for models which inherit from PrimaryModel.
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
class OrganizationalObjectTypeV1(
|
||||
ChangelogMixin,
|
||||
CustomFieldsMixin,
|
||||
JournalEntriesMixin,
|
||||
TagsMixin,
|
||||
OwnerMixin,
|
||||
BaseObjectTypeV1
|
||||
):
|
||||
"""
|
||||
@ -65,6 +84,20 @@ class OrganizationalObjectTypeV1(
|
||||
pass
|
||||
|
||||
|
||||
class NestedGroupObjectTypeV1(
|
||||
ChangelogMixin,
|
||||
CustomFieldsMixin,
|
||||
JournalEntriesMixin,
|
||||
TagsMixin,
|
||||
OwnerMixin,
|
||||
BaseObjectTypeV1
|
||||
):
|
||||
"""
|
||||
Base GraphQL type for models which inherit from NestedGroupModel.
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
class NetBoxObjectTypeV1(
|
||||
ChangelogMixin,
|
||||
CustomFieldsMixin,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user