jumpserver/jlog/models.py

23 lines
783 B
Python
Raw Normal View History

2015-04-20 02:12:11 +00:00
from django.db import models
class Log(models.Model):
user = models.CharField(max_length=20, null=True)
host = models.CharField(max_length=20, null=True)
remote_ip = models.CharField(max_length=100)
dept_name = models.CharField(max_length=20)
log_path = models.CharField(max_length=100)
start_time = models.DateTimeField(null=True)
pid = models.IntegerField(max_length=10)
is_finished = models.BooleanField(default=False)
log_finished = models.BooleanField(default=False)
end_time = models.DateTimeField(null=True)
def __unicode__(self):
2015-04-24 10:19:43 +00:00
return self.log_path
class Alert(models.Model):
msg = models.CharField(max_length=20)
time = models.DateTimeField(null=True)
is_finished = models.BigIntegerField(default=False)