# Path: pytorque/models.py
# class PBSServer(models.Model):
#     time = models.DateTimeField(
#         default=datetime.now)#auto_now_add=True sets datetime with creating object, not with every modifying action
# 
#     name = models.CharField(max_length=100)
#     state = models.CharField(max_length=20)
#     total_jobs = models.IntegerField()
#     running_jobs = models.IntegerField()
#     queued_jobs = models.IntegerField()
#     pbs_version = models.CharField(max_length=10)
# 
# Path: pytorque/models.py
# class PBSQueue(models.Model):
#     server = models.ForeignKey(PBSServer)#, blank=True, null=True, on_delete=models.SET_NULL
#     time = models.DateTimeField(default=datetime.now)
# 
#     name = models.CharField(default='', max_length=100, blank=True, null=True)
#     type = models.CharField(default='', max_length=20, blank=True, null=True)
#     total_jobs = models.IntegerField(default=0)
#     running_jobs = models.IntegerField(default=0)
#     queued_jobs = models.IntegerField(default=0)
#     resource_walltime = models.CharField(default='', max_length=20, blank=True, null=True)
#     resource_nodes = models.IntegerField(default=0)
# 
# Path: pytorque/models.py
# class PBSJob(models.Model):
#     user = models.ForeignKey(User)
#     queue = models.ForeignKey(PBSQueue)
#     time = models.DateTimeField(default=datetime.now)
# 
#     jobId = models.CharField(default='', max_length=50, blank=True, null=True)
#     name = models.CharField(default='', max_length=100, blank=True, null=True)
#     owner = models.CharField(default='', max_length=100, blank=True, null=True)
#     state = models.CharField(default='', max_length=10, blank=True, null=True)
#     queue_raw = models.CharField(default='', max_length=100, blank=True, null=True)
# 
#     start_time = models.DateTimeField(default=datetime.now, blank=True, null=True)
#     resource_cput = models.CharField(default='', max_length=20, blank=True, null=True)
#     resource_mem = models.CharField(default='', max_length=20, blank=True, null=True)
#     resource_vmem = models.CharField(default='', max_length=20, blank=True, null=True)
#     resource_walltime = models.CharField(default='', max_length=20, blank=True, null=True)
# 
# Path: pytorque/models.py
# class PBSUserStat(models.Model):
#     time = models.DateTimeField(default=datetime.now, auto_now_add=True)
# 
#     username = models.CharField(default='', max_length=100, blank=True, null=True)
#     jobCount = models.IntegerField(default=0, blank=True, null=True)


from pytorque.models import PBSServer
from pytorque.models import PBSQueue
from pytorque.models import PBSJob
from pytorque.models import PBSUserStat
from django.contrib import admin

admin.site.register(PBSServer)
admin.site.register(PBSQueue)
admin.site.register(PBSJob)

# Path: pytorque/models.py
# class PBSServer(models.Model):
#     time = models.DateTimeField(
#         default=datetime.now)#auto_now_add=True sets datetime with creating object, not with every modifying action
# 
#     name = models.CharField(max_length=100)
#     state = models.CharField(max_length=20)
#     total_jobs = models.IntegerField()
#     running_jobs = models.IntegerField()
#     queued_jobs = models.IntegerField()
#     pbs_version = models.CharField(max_length=10)
# 
# Path: pytorque/models.py
# class PBSQueue(models.Model):
#     server = models.ForeignKey(PBSServer)#, blank=True, null=True, on_delete=models.SET_NULL
#     time = models.DateTimeField(default=datetime.now)
# 
#     name = models.CharField(default='', max_length=100, blank=True, null=True)
#     type = models.CharField(default='', max_length=20, blank=True, null=True)
#     total_jobs = models.IntegerField(default=0)
#     running_jobs = models.IntegerField(default=0)
#     queued_jobs = models.IntegerField(default=0)
#     resource_walltime = models.CharField(default='', max_length=20, blank=True, null=True)
#     resource_nodes = models.IntegerField(default=0)
# 
# Path: pytorque/models.py
# class PBSJob(models.Model):
#     user = models.ForeignKey(User)
#     queue = models.ForeignKey(PBSQueue)
#     time = models.DateTimeField(default=datetime.now)
# 
#     jobId = models.CharField(default='', max_length=50, blank=True, null=True)
#     name = models.CharField(default='', max_length=100, blank=True, null=True)
#     owner = models.CharField(default='', max_length=100, blank=True, null=True)
#     state = models.CharField(default='', max_length=10, blank=True, null=True)
#     queue_raw = models.CharField(default='', max_length=100, blank=True, null=True)
# 
#     start_time = models.DateTimeField(default=datetime.now, blank=True, null=True)
#     resource_cput = models.CharField(default='', max_length=20, blank=True, null=True)
#     resource_mem = models.CharField(default='', max_length=20, blank=True, null=True)
#     resource_vmem = models.CharField(default='', max_length=20, blank=True, null=True)
#     resource_walltime = models.CharField(default='', max_length=20, blank=True, null=True)
# 
# Path: pytorque/models.py
# class PBSUserStat(models.Model):
#     time = models.DateTimeField(default=datetime.now, auto_now_add=True)
# 
#     username = models.CharField(default='', max_length=100, blank=True, null=True)
#     jobCount = models.IntegerField(default=0, blank=True, null=True)


# Path: pytorque/admin.py
from pytorque.models import PBSServer
from pytorque.models import PBSQueue
from pytorque.models import PBSJob
from pytorque.models import PBSUserStat
from django.contrib import admin


admin.site.register(PBSServer)
admin.site.register(PBSQueue)
admin.site.register(PBSJob)

admin.site.register(PBSUserStat)