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()
[((110, 127), 'django.db.models.URLField', 'models.URLField', ([], {}), '()\n', (125, 127), False, 'from django.db import models\n'), ((143, 161), 'django.db.models.SlugField', 'models.SlugField', ([], {}), '()\n', (159, 161), False, 'from django.db import models\n'), ((176, 206), 'django.db.models.IntegerField', 'models.IntegerField', ([], {'default': '(0)'}), '(default=0)\n', (195, 206), False, 'from django.db import models\n'), ((305, 317), 'shorty.manager.UrlManager', 'UrlManager', ([], {}), '()\n', (315, 317), False, 'from shorty.manager import UrlManager\n')]