blob: d5c86cd8ff1c67301c202782b98537cf8656c28e [file] [log] [blame]
Scott Baker3de3e372013-05-10 16:50:44 -07001import os
2from django.db import models
3from core.models import PlCoreBase
Scott Baker3de3e372013-05-10 16:50:44 -07004from core.models import ServiceClass
5
6# Create your models here.
7
8class ServiceResource(PlCoreBase):
Sapan Bhatia13d2db92014-11-11 21:47:45 -05009 serviceClass = models.ForeignKey(ServiceClass, related_name = "serviceresources")
Scott Baker3de3e372013-05-10 16:50:44 -070010 name = models.CharField(max_length=32)
11 maxUnitsDeployment = models.IntegerField(default=1)
12 maxUnitsNode = models.IntegerField(default=1)
13 maxDuration = models.IntegerField(default=1)
14 bucketInRate = models.IntegerField(default=0)
15 bucketMaxSize = models.IntegerField(default=0)
16 cost = models.IntegerField(default=0)
17 calendarReservable = models.BooleanField(default=True)
18
19 def __unicode__(self): return u'%s' % (self.name)