jumpserver/webroot/AutoSa/Assets/models.py

18 lines
498 B
Python
Raw Normal View History

2014-08-14 09:22:25 +00:00
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)
2014-09-16 04:11:44 +00:00
idc = models.CharField(max_length=50)
2014-08-14 09:22:25 +00:00
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)