# Generated by Django 4.0.1 on 2022-02-13 17:03

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Site',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('domain_name', models.CharField(max_length=63, validators=[django.core.validators.RegexValidator('^[a-z0-9][a-z0-9\\-]+[a-z0-9]$', message='Domain names can only use letters, numbers and hyphens (“-“). Names cannot begin or end with a hyphen. Domains cannot exceed 63 characters. Domain name can only contains at least 3 characters.')])),
                ('domain', models.CharField(max_length=3, validators=[django.core.validators.RegexValidator('[a-z]{2,3}')])),
            ],
        ),
        migrations.CreateModel(
            name='Review',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('rating', models.IntegerField(validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(5)])),
                ('description', models.TextField(blank=True)),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('site', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='reviews.site')),
            ],
        ),
    ]
