jumpserver/jlog/models.py

17 lines
490 B
Python
Raw Normal View History

2014-12-26 13:57:10 +00:00
from django.db import models
2014-12-26 14:54:37 +00:00
from juser.models import User
from jasset.models import Asset
class Log(models.Model):
2014-12-26 15:58:11 +00:00
user = models.ForeignKey(User)
2014-12-26 14:54:37 +00:00
asset = models.ForeignKey(Asset)
log_path = models.CharField(max_length=100)
start_time = models.IntegerField()
pid = models.IntegerField(max_length=10)
is_finished = models.BooleanField(default=False)
end_time = models.IntegerField(blank=True, null=True)
def __unicode__(self):
return self.log_path