diff options
Diffstat (limited to 'python/tbc_www/models.py')
-rw-r--r-- | python/tbc_www/models.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/python/tbc_www/models.py b/python/tbc_www/models.py index b51e154..fc91a8b 100644 --- a/python/tbc_www/models.py +++ b/python/tbc_www/models.py @@ -109,3 +109,21 @@ class BuildJobs(models.Model): db_table = 'build_jobs' def __str__(self): return '%s %s %s %s %s %s %s' % (self.BuildJobId, self.EbuildId, self.ConfigId, self.Status, self.BuildNow, self.RemoveBin, self.TimeStamp) + +class Uses(models.Model): + UseId = models.IntegerField(primary_key=True, db_column='use_id') + Flag = models.CharField(max_length=150, db_column='flag') + class Meta: + db_table = 'uses' + def __str__(self): + return '%s %s' % (self.UseId, self.Flag) + +class BuildJobsUse(models.Model): + Id = models.IntegerField(primary_key=True, db_column='id') + BuildJobId = models.ForeignKey(BuildJobs, db_column='build_job_id') + UseId = models.ForeignKey(Uses, db_column='use_id') + Status = models.BooleanField(db_column='status') + class Meta: + db_table = 'build_jobs_use' + def __str__(self): + return '%s %s %s %s' % (self.Id, self.BuildJobId, self.UseId, self.Status) |