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, 'django.db.models.URLField', 'models.URLField', False, 'from django.db import models\n'), (8, 'django.db.models.SlugField', 'models.SlugField', False, 'from django.db import models\n'), (9, 'django.db.models.IntegerField', 'models.IntegerField', False, 'from django.db import models\n'), (14, 'shorty.manager.UrlManager', 'UrlManager', False, 'from shorty.manager import UrlManager\n')]