mirror of https://github.com/jumpserver/jumpserver
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
498 B
18 lines
498 B
from django.db import models
|
|
from UserManage.models import User
|
|
|
|
|
|
class Assets(models.Model):
|
|
id = models.AutoField(primary_key=True)
|
|
ip = models.CharField(max_length=20)
|
|
port = models.IntegerField(max_length=5)
|
|
idc = models.CharField(max_length=50)
|
|
comment = models.CharField(max_length=100, blank=True, null=True)
|
|
|
|
def __unicode__(self):
|
|
return '%s ' % self.ip
|
|
|
|
|
|
class AssetsUser(models.Model):
|
|
uid = models.ForeignKey(User)
|
|
aid = models.ForeignKey(Assets) |