diff options
Diffstat (limited to 'main')
-rw-r--r-- | main/models.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/main/models.py b/main/models.py index db63d59f..c82eca6a 100644 --- a/main/models.py +++ b/main/models.py @@ -102,6 +102,13 @@ class News(models.Model): def get_absolute_url(self): return '/news/%i/' % self.id +class Arch(models.Model): + id = models.AutoField(primary_key=True) + name = models.CharField(maxlength=255) + class Meta: + db_table = 'arch' + ordering = ['name'] + class Repo(models.Model): id = models.AutoField(primary_key=True) name = models.CharField(maxlength=255) @@ -119,6 +126,7 @@ class Repo(models.Model): class Package(models.Model): id = models.AutoField(primary_key=True) repo = models.ForeignKey(Repo) + arch = models.ForeignKey(Arch) maintainer = models.ForeignKey(User, related_name='package_maintainer') needupdate = models.BooleanField(default=False) pkgname = models.CharField(maxlength=255) @@ -169,6 +177,14 @@ class PackageFile(models.Model): class Meta: db_table = 'packages_files' +class PackageDepends(models.Model): + id = models.AutoField(primary_key=True) + pkg = models.ForeignKey(Package) + depname = models.CharField(db_index=True, maxlength=255) + depvcmp = models.CharField(maxlength=255) + class Meta: + db_table = 'packages_depends' + class Todolist(models.Model): id = models.AutoField(primary_key=True) creator = models.ForeignKey(User, related_name='todolist_creator') |