# Generated by Django 3.2.9 on 2021-12-09 16:34

import django.core.validators
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('sessions', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Url',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('full_url', models.URLField(verbose_name='Полная ссылка')),
                ('short_url', models.CharField(blank=True, max_length=100, unique=True, validators=[django.core.validators.RegexValidator(message='Неверный формат, пробельные символы не поддерживаются.', regex='^[a-zA-Z0-9_,/.:;&@]*$')], verbose_name='Сокращенная ссылка')),
                ('creation_date', models.DateTimeField(auto_now_add=True)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='urls', to='sessions.session')),
            ],
            options={
                'verbose_name': 'Cсылка',
                'verbose_name_plural': 'Ссылки',
                'ordering': ('-creation_date',),
            },
        ),
    ]
