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 |
| 4 | from core.models import Site |
| 5 | from core.models import DeploymentNetwork |
| 6 | from core.models import ServiceClass |
| 7 | |
| 8 | # Create your models here. |
| 9 | |
| 10 | class ServiceResource(PlCoreBase): |
| 11 | serviceClass = models.ForeignKey(ServiceClass, related_name = "resources") |
| 12 | name = models.CharField(max_length=32) |
| 13 | maxUnitsDeployment = models.IntegerField(default=1) |
| 14 | maxUnitsNode = models.IntegerField(default=1) |
| 15 | maxDuration = models.IntegerField(default=1) |
| 16 | bucketInRate = models.IntegerField(default=0) |
| 17 | bucketMaxSize = models.IntegerField(default=0) |
| 18 | cost = models.IntegerField(default=0) |
| 19 | calendarReservable = models.BooleanField(default=True) |
| 20 | |
| 21 | def __unicode__(self): return u'%s' % (self.name) |