mirror of https://github.com/jumpserver/jumpserver
14 lines
337 B
Python
14 lines
337 B
Python
from django.contrib.contenttypes.fields import GenericRelation
|
|
from django.db import models
|
|
|
|
from .models import LabeledResource
|
|
|
|
__all__ = ['LabeledMixin']
|
|
|
|
|
|
class LabeledMixin(models.Model):
|
|
labels = GenericRelation(LabeledResource, object_id_field='res_id', content_type_field='res_type')
|
|
|
|
class Meta:
|
|
abstract = True
|