Siobhan Tully | 00353f7 | 2013-10-08 21:53:27 -0400 | [diff] [blame] | 1 | from core.models import PlCoreBase,SingletonModel |
| 2 | from django.db import models |
| 3 | |
| 4 | class Service(PlCoreBase): |
| 5 | description = models.TextField(max_length=254,null=True, blank=True,help_text="Description of Service") |
| 6 | enabled = models.BooleanField(default=True) |
| 7 | name = models.CharField(max_length=30, help_text="Service Name") |
| 8 | versionNumber = models.CharField(max_length=30, help_text="Version of Service Definition") |
Siobhan Tully | cf04fb6 | 2014-01-11 11:25:57 -0500 | [diff] [blame] | 9 | published = models.BooleanField(default=True) |
Siobhan Tully | 00353f7 | 2013-10-08 21:53:27 -0400 | [diff] [blame] | 10 | |
| 11 | def __unicode__(self): return u'%s' % (self.name) |
| 12 | |
| 13 | class ServiceAttribute(PlCoreBase): |
| 14 | name = models.SlugField(help_text="Attribute Name", max_length=128) |
| 15 | value = models.CharField(help_text="Attribute Value", max_length=1024) |
| 16 | service = models.ForeignKey(Service, related_name='serviceattributes', help_text="The Service this attribute is associated with") |
| 17 | |
| 18 | |