From bc1e1dae4d8c85f399c20dc8c78988c9e80d74f5 Mon Sep 17 00:00:00 2001 From: Matheus Fernandes Date: Tue, 25 Aug 2015 11:31:19 -0300 Subject: [PATCH] Added GitlabGroup model --- colab/plugins/gitlab/models.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+), 0 deletions(-) diff --git a/colab/plugins/gitlab/models.py b/colab/plugins/gitlab/models.py index 0f6a612..85c5aca 100644 --- a/colab/plugins/gitlab/models.py +++ b/colab/plugins/gitlab/models.py @@ -24,6 +24,24 @@ class GitlabProject(models.Model, HitCounterModelMixin): verbose_name_plural = _('Gitlab Projects') +class GitlabGroup(models.Model): + id = models.IntegerField(primary_key=True) + name = models.CharField(max_length=100) + path = models.CharField(max_length=100) + owner_id = models.IntegerField(null=True) + + def __unicode__(self): + return u'{}'.format(self.path) + + @property + def url(self): + return u'/gitlab/groups/{}'.format(self.id) + + class Meta: + verbose_name = _('Gitlab Group') + verbose_name_plural = _('Gitlab Groups') + + class GitlabMergeRequest(Collaboration): id = models.IntegerField(primary_key=True) -- libgit2 0.21.2