from django.db import models

from shorty.manager import UrlManager


class Url(models.Model):
    long_url = models.URLField()
    short_id = models.SlugField()
    counter = models.IntegerField(default=0)

    def __str__(self):
        return "%s -- %s" % (self.long_url, self.short_id)

    objects = UrlManager()
[((7, 15, 7, 32), 'django.db.models.URLField', 'models.URLField', ({}, {}), '()', False, 'from django.db import models\n'), ((8, 15, 8, 33), 'django.db.models.SlugField', 'models.SlugField', ({}, {}), '()', False, 'from django.db import models\n'), ((9, 14, 9, 44), 'django.db.models.IntegerField', 'models.IntegerField', (), '', False, 'from django.db import models\n'), ((14, 14, 14, 26), 'shorty.manager.UrlManager', 'UrlManager', ({}, {}), '()', False, 'from shorty.manager import UrlManager\n')]