Scott Baker | 3de3e37 | 2013-05-10 16:50:44 -0700 | [diff] [blame] | 1 | import os |
| 2 | from django.db import models |
| 3 | from core.models import PlCoreBase |
Scott Baker | 3de3e37 | 2013-05-10 16:50:44 -0700 | [diff] [blame] | 4 | from core.models import ServiceClass |
| 5 | |
| 6 | # Create your models here. |
| 7 | |
| 8 | class ServiceResource(PlCoreBase): |
Sapan Bhatia | 13d2db9 | 2014-11-11 21:47:45 -0500 | [diff] [blame] | 9 | serviceClass = models.ForeignKey(ServiceClass, related_name = "serviceresources") |
Scott Baker | 3de3e37 | 2013-05-10 16:50:44 -0700 | [diff] [blame] | 10 | 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) |