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

15 lines
390 B
Python
Raw Normal View History

2022-04-02 10:35:46 +00:00
from django.db import models
2022-04-26 13:30:01 +00:00
from django.utils.translation import gettext_lazy as _
2022-04-02 10:35:46 +00:00
from .common import Asset
class Database(Asset):
2022-04-26 13:30:01 +00:00
db_name = models.CharField(max_length=1024, verbose_name=_("Database"), blank=True)
2022-04-28 04:47:39 +00:00
def __str__(self):
return '{}({}://{}/{})'.format(self.hostname, self.type, self.ip, self.db_name)
2022-04-26 13:30:01 +00:00
class Meta:
verbose_name = _("Database")