# Generated by Django 3.1.14 on 2022-02-02 08:29

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('geocontext', '0002_auto_20210915_1830'),
    ]

    operations = [
        migrations.CreateModel(
            name='UserTier',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=256)),
                ('order', models.IntegerField(default=0, verbose_name='Order on website')),
                ('description', models.TextField(blank=True, default='')),
                ('request_limit', models.CharField(default='100/day', help_text='API request limit for user', max_length=100)),
                ('price_amount', models.DecimalField(decimal_places=2, default=0, max_digits=9)),
                ('logo', models.FileField(blank=True, null=True, upload_to='user_tier_logo/')),
            ],
            options={
                'ordering': ('order',),
            },
        ),
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('subscribed', models.BooleanField(default=False)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='user_profile', to=settings.AUTH_USER_MODEL)),
                ('user_tier', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='geocontext.usertier')),
            ],
        ),
    ]
