# Generated by Django 3.2 on 2021-05-25 17:12

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('accounts', '0001_initial'),
        ('entities_details', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='ServiceReview',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateField(auto_now=True, verbose_name='date')),
                ('rating', models.CharField(choices=[('1', '1'), ('2', '2'), ('3', '3'), ('4', '4'), ('5', '5')], max_length=1, verbose_name='rating')),
                ('review', models.CharField(blank=True, max_length=255, null=True, verbose_name='review')),
                ('service', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reviews', to='entities_details.servicedetail', verbose_name='service')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='services_reviews', to='accounts.user', verbose_name='user')),
            ],
            options={
                'verbose_name': 'service review',
                'verbose_name_plural': 'Services Reviews',
            },
        ),
        migrations.CreateModel(
            name='ClinicReview',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateField(auto_now=True, verbose_name='date')),
                ('rating', models.CharField(choices=[('1', '1'), ('2', '2'), ('3', '3'), ('4', '4'), ('5', '5')], max_length=1, verbose_name='rating')),
                ('review', models.CharField(blank=True, max_length=255, null=True, verbose_name='review')),
                ('clinic', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reviews', to='entities_details.clinicdetail', verbose_name='clinic')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='clinics_reviews', to='accounts.user', verbose_name='user')),
            ],
            options={
                'verbose_name': 'clinic review',
                'verbose_name_plural': 'Clinics Reviews',
            },
        ),
        migrations.AddConstraint(
            model_name='servicereview',
            constraint=models.UniqueConstraint(fields=('user', 'service'), name='unique_service_review'),
        ),
        migrations.AddConstraint(
            model_name='clinicreview',
            constraint=models.UniqueConstraint(fields=('user', 'clinic'), name='unique_clinic_review'),
        ),
    ]
