jumpserver/jperm/models.py

11 lines
279 B
Python
Raw Normal View History

2014-12-22 15:17:28 +00:00
from django.db import models
2014-12-22 15:36:32 +00:00
from juser.models import User
from jasset.models import Asset
2014-12-22 15:17:28 +00:00
2014-12-22 15:36:32 +00:00
2015-01-24 07:02:50 +00:00
class Perm(models.Model):
2014-12-22 15:36:32 +00:00
user = models.ForeignKey(User)
asset = models.ForeignKey(Asset)
def __unicode__(self):
return '%s_%s' % (self.user.username, self.asset.ip)