# Copyright 1998-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 from django.db import models class Categories(models.Model): CategoryId = models.IntegerField(primary_key=True, db_column='category_id') Category = models.CharField(max_length=150, db_column='category') Active = models.BooleanField(db_column='active') TimeStamp = models.DateTimeField(db_column='time_stamp') class Meta: db_table = 'categories' def __str__(self): return '%s %s %s %s' % (self.CategoryId, self.Category, self.Active, self.TimeStamp) class CategoriesMetadata(models.Model): Id = models.IntegerField(primary_key=True, db_column='id') CategoryId = models.ForeignKey(Categories, db_column='category_id') Checksum = models.CharField(max_length=100, db_column='checksum') Descriptions = models.TextField(db_column='descriptions') class Meta: db_table = 'categories_metadata' def __str__(self): return '%s %s %s %s' % (self.Id, self.CategoryId, self.Checksum, self.Descriptions) class Repos(models.Model): RepoId = models.IntegerField(primary_key=True, db_column='repo_id') Repo = models.CharField(max_length=100, db_column='repo') class Meta: db_table = 'repos' def __str__(self): return '%s %s' % (self.RepoId, self.Repo) class Packages(models.Model): PackageId = models.IntegerField(primary_key=True, db_column='package_id') CategoryId = models.ForeignKey(Categories, db_column='category_id') Package = models.CharField(max_length=150, db_column='package') RepoId = models.ForeignKey(Repos, db_column='repo_id') Active = models.BooleanField(db_column='active') TimeStamp = models.DateTimeField(db_column='time_stamp') class Meta: db_table = 'packages' def __str__(self): return '%s %s %s %s %s %s' % (self.PackageId, self.CategoryId, self.Package, self.RepoId, self.Active, self.TimeStamp) class PackagesMetadata(models.Model): Id = models.IntegerField(primary_key=True, db_column='id') PackageId = models.ForeignKey(Packages, db_column='package_id') Gitlog = models.TextField(db_column='gitlog') Descriptions = models.TextField(db_column='descriptions') class Meta: db_table = 'packages_metadata' def __str__(self): return '%s %s %s %s' % (self.Id, self.PackageId, self.Gitlog, self.Descriptions) class Ebuilds(models.Model): EbuildId = models.IntegerField(primary_key=True, db_column='ebuild_id') PackageId = models.ForeignKey(Packages, db_column='package_id') Version = models.CharField(max_length=150, db_column='version') Checksum = models.CharField(max_length=100, db_column='checksum') Active = models.BooleanField(db_column='active') TimeStamp = models.DateTimeField(db_column='time_stamp') class Meta: db_table = 'ebuilds' def __str__(self): return '%s %s %s %s %s %s' % (self.EbuildId, self.PackageId, self.Version, self.Checksum, self.Active, self.TimeStamp) class EbuildsMetadata(models.Model): Id = models.IntegerField(primary_key=True, db_column='id') EbuildId = models.ForeignKey(Ebuilds, db_column='ebuild_id') Commit = models.CharField(max_length=30, db_column='commit') New = models.BooleanField(db_column='new') Descriptions = models.CharField(max_length=200, db_column='descriptions') class Meta: db_table = 'ebuilds_metadata' def __str__(self): return '%s %s %s %s %s' % (self.Id, self.EbuildId, self,Commit, self.New, self.Descriptions) class BuildLogs(models.Model): BuildLogId = models.IntegerField(primary_key=True, db_column='build_log_id') EbuildId = models.ForeignKey(Ebuilds, db_column='ebuild_id') Fail = models.BooleanField(db_column='fail') SummeryText = models.TextField(db_column='summery_text') LogHash = models.CharField(max_length=100, db_column='log_hash') BugId = models.IntegerField( db_column='bug_id') TimeStamp = models.DateTimeField(db_column='time_stamp') class Meta: db_table = 'build_logs' def __str__(self): return '%s %s %s %s %s %s %s' % (self.BuildLogId, self.EbuildId, self.Fail, self.SummeryText, self.LogHash, self.BugId, self.TimeStamp) class BuildLogsRepoman(models.Model): Id = models.IntegerField(primary_key=True, db_column='id') BuildLogId = models.ForeignKey(BuildLogs, db_column='build_log_id') SummeryText = models.TextField(db_column='summery_text') class Meta: db_table = 'build_logs_repoman' def __str__(self): return '%s %s %s' % (self.Id, self.BuildLogId, self.SummeryText) class BuildLogsQa(models.Model): Id = models.IntegerField(primary_key=True, db_column='id') BuildLogId = models.ForeignKey(BuildLogs, db_column='build_log_id') SummeryText = models.TextField(db_column='summery_text') class Meta: db_table = 'build_logs_qa' def __str__(self): return '%s %s %s' % (self.Id, self.BuildLogId, self.SummeryText) class PackagesRepoman(models.Model): Id = models.IntegerField(primary_key=True, db_column='id') PackageId = models.ForeignKey(Packages, db_column='package_id') RepomanText = models.TextField(db_column='repoman_text') RepomanHash = models.CharField(max_length=100, db_column='repoman_hash') TimeStamp = models.DateTimeField(db_column='time_stamp') class Meta: db_table = 'packages_repoman' def __str__(self): return '%s %s %s %s %s' % (self.Id, self.PackageId, self.RepomanText, self.RepomanHash, self.TimeStamp) class ErrorsInfo(models.Model): ErrorId = models.IntegerField(primary_key=True, db_column='error_id') ErrorName = models.CharField(max_length=20, db_column='error_name') ErrorSearch = models.CharField(max_length=30, db_column='error_search') class Meta: db_table = 'errors_info' def __str__(self): return '%s %s %s' % (self.ErrorId, self.ErrorName, self.ErrorSearch) class BuildLogsErrors(models.Model): Id = models.IntegerField(primary_key=True, db_column='id') BuildLogId = models.ForeignKey(BuildLogs, db_column='build_log_id') ErrorId = models.ForeignKey(ErrorsInfo, db_column='error_id') class Meta: db_table = 'build_logs_errors' def __str__(self): return '%s %s %s' % (self.Id, self.BuildLogId, self.ErrorId) class EmergeInfo(models.Model): EInfoId = models.IntegerField(primary_key=True, db_column='einfo_id') EmergeInfoText = models.TextField(db_column='emerge_info_text') class Meta: db_table = 'emerge_info' def __str__(self): return '%s %s %s' % (self.EInfoId, self.Checksum, self.EmergeInfoText) class Setups(models.Model): SetupId = models.AutoField(primary_key=True, db_column='setup_id') Setup = models.CharField(max_length=100, db_column='setup') Profile = models.CharField(max_length=150, db_column='profile') class Meta: db_table = 'setups' def __str__(self): return '%s %s %s' % (self.SetupId, self.Setup, self.Profile) class Configs(models.Model): ConfigId = models.AutoField(primary_key=True, db_column='config_id') HostName = models.CharField(max_length=150, db_column='hostname') SetupId = models.ForeignKey(Setups, db_column='setup_id') DefaultConfig = models.BooleanField(db_column='default_config') class Meta: db_table = 'configs' def __str__(self): return '%s %s %s %s' % (self.ConfigId, self.HostName, self.SetupId, self.DefaultConfig) class BuildLogsConfig(models.Model): LogId = models.IntegerField(primary_key=True, db_column='log_id') BuildLogId = models.ForeignKey(BuildLogs, db_column='build_log_id') ConfigId = models.ForeignKey(Configs, db_column='config_id') EInfoId = models.ForeignKey(EmergeInfo, db_column='einfo_id') LogName = models.CharField(max_length=450, db_column='logname') TimeStamp = models.DateTimeField(db_column='time_stamp') class Meta: db_table = 'build_logs_config' def __str__(self): return '%s %s %s %s %s %s' % (self.LogId, self.BuildLogId, self.ConfigId, self.EInfoId, self.LogName, self.TimeStamp) class EmergeOptions(models.Model): EmergeOptionId = models.IntegerField(primary_key=True, db_column='eoption_id') EOption = models.CharField(max_length=45, db_column='eoption') class Meta: db_table = 'emerge_options' def __str__(self): return '%s %s' % (self.EmergeOptionId, self.EOption) class BuildLogsEmergeOptions(models.Model): Id = models.IntegerField(primary_key=True, db_column='id') BuildLogId = models.ForeignKey(BuildLogs, db_column='build_log_id') EmergeOptionId = models.ForeignKey(EmergeOptions, db_column='eoption_id') class Meta: db_table = 'build_logs_emerge_options' def __str__(self): return '%s %s %s' % (self.Id, self.BuildLogId, self.EmergeOptionId) 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 BuildLogsUse(models.Model): Id = models.IntegerField(primary_key=True, db_column='id') BuildLogId = models.ForeignKey(BuildLogs, db_column='build_log_id') UseId = models.ForeignKey(Uses, db_column='use_id') Status = models.BooleanField(max_length=15, db_column='status') class Meta: db_table = 'build_logs_use' def __str__(self): return '%s %s %s' % (self.BuildLogId, self.UseId, self.Status) class BuildJobs(models.Model): BuildJobId = models.AutoField(primary_key=True, db_column='build_job_id') EbuildId = models.ForeignKey(Ebuilds, db_column='ebuild_id') SetupId = models.ForeignKey(Setups, db_column='setup_id') ConfigId = models.ForeignKey(Configs, db_column='config_id') Status = models.CharField(max_length=21, db_column='status') BuildNow = models.BooleanField(db_column='build_now') RemoveBin = models.BooleanField(db_column='removebin') TimeStamp = models.DateTimeField(db_column='time_stamp') class Meta: db_table = 'build_jobs' def __str__(self): return '%s %s %s %s %s %s %s %s' % (self.BuildJobId, self.EbuildId, self.SetupId, self.ConfigId, self.Status, self.BuildNow, self.RemoveBin, self.TimeStamp) 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) class Keywords(models.Model): KeywordId = models.IntegerField(primary_key=True, db_column='keyword_id') Keyword = models.CharField(max_length=45, db_column='keyword') class Meta: db_table = 'keywords' 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') KeywordId = models.ForeignKey(Keywords, db_column='keyword_id') Status = models.CharField(max_length=24, db_column='status') class Meta: 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)