diff options
Diffstat (limited to 'python/tbc_www/models.py')
-rw-r--r-- | python/tbc_www/models.py | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/python/tbc_www/models.py b/python/tbc_www/models.py index 621a7dc..2cb327a 100644 --- a/python/tbc_www/models.py +++ b/python/tbc_www/models.py @@ -175,6 +175,14 @@ class Keywords(models.Model): def __str__(self): return '%s %s' % (self.KeywordId, self.Keyword) +class Restrictions(models.Model): + RestrictionId = models.IntegerField(primary_key=True, db_column='restriction_id') + Restriction = models.CharField(max_length=150, db_column='restriction') + class Meta: + db_table = 'restrictions' + def __str__(self): + return '%s %s' % (self.RestrictionId, self.Restriction) + class EbuildsKeywords(models.Model): Id = models.IntegerField(primary_key=True, db_column='id') EbuildId = models.ForeignKey(Ebuilds, db_column='ebuild_id') @@ -184,3 +192,22 @@ class EbuildsKeywords(models.Model): db_table = 'ebuilds_keywords' def __str__(self): return '%s %s %s' % (self.EbuildId, self.KeywordId, self.Status) + +class EbuildsIuse(models.Model): + Id = models.IntegerField(primary_key=True, db_column='id') + EbuildId = models.ForeignKey(Ebuilds, db_column='ebuild_id') + UseId = models.ForeignKey(Uses, db_column='use_id') + Status =models.BooleanField(db_column='status') + class Meta: + db_table = 'ebuilds_iuse' + def __str__(self): + return '%s %s %s %s' % (self.Id, self.EbuildId, self.UseId, self.Status) + +class EbuildsRestrictions(models.Model): + Id = models.IntegerField(primary_key=True, db_column='id') + EbuildId = models.ForeignKey(Ebuilds, db_column='ebuild_id') + RestrictionId = models.ForeignKey(Restrictions, db_column='restriction_id') + class Meta: + db_table = 'ebuilds_restrictions' + def __str__(self): + return '%s %s' % (self.EbuildId, self.RestrictionId) |