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 |
Siobhan Tully | bf1153a | 2013-05-27 20:53:48 -0400 | [diff] [blame] | 5 | from core.models import Deployment |
Scott Baker | 3de3e37 | 2013-05-10 16:50:44 -0700 | [diff] [blame] | 6 | from core.models import ServiceClass |
| 7 | |
| 8 | # Create your models here. |
| 9 | |
| 10 | class ServiceResource(PlCoreBase): |
Sapan Bhatia | 13d2db9 | 2014-11-11 21:47:45 -0500 | [diff] [blame^] | 11 | serviceClass = models.ForeignKey(ServiceClass, related_name = "serviceresources") |
Scott Baker | 3de3e37 | 2013-05-10 16:50:44 -0700 | [diff] [blame] | 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) |