jumpserver/apps/assets/models/asset/remote_app.py

17 lines
589 B
Python
Raw Normal View History

2022-04-06 10:14:51 +00:00
from django.utils.translation import gettext_lazy as _
from django.db import models
2022-04-26 13:30:01 +00:00
from orgs.mixins.models import OrgModelMixin
from common.mixins.models import CommonModelMixin
2022-04-06 03:29:16 +00:00
from .common import Asset
2022-04-26 13:30:01 +00:00
class RemoteAppHost(CommonModelMixin, OrgModelMixin):
host = models.ForeignKey('assets.Host', verbose_name=_("Host"))
system_user = models.ForeignKey('assets.SystemUser', verbose_name=_("System user"))
2022-04-06 03:29:16 +00:00
class RemoteApp(Asset):
2022-04-06 10:14:51 +00:00
app_path = models.CharField(max_length=1024, verbose_name=_("App path"))
attrs = models.JSONField(default=dict, verbose_name=_('Attrs'))