# Generated by Django 3.2.16 on 2022-12-31 12:19

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


class Migration(migrations.Migration):

    dependencies = [
        ('order', '0015_item_order'),
    ]

    operations = [
        migrations.CreateModel(
            name='NextcloudProvider',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('extended_data', models.JSONField(default=dict, editable=False)),
                ('name', models.CharField(max_length=255, verbose_name='Name')),
                ('url', models.URLField(verbose_name='URL')),
                ('username', models.CharField(max_length=255, verbose_name='Username')),
                ('password', models.CharField(max_length=255, verbose_name='Password')),
            ],
            options={
                'verbose_name': 'Nextcloud provider',
                'verbose_name_plural': 'Nextcloud providers',
            },
        ),
        migrations.CreateModel(
            name='DigitalProduct',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('extended_data', models.JSONField(default=dict, editable=False)),
                ('name', models.CharField(max_length=255, verbose_name='Name')),
                ('nextcloud_path', models.TextField(verbose_name='Nextcloud path')),
                ('published', models.BooleanField(default=False, verbose_name='Published')),
                ('nextcloud_provider', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='order.nextcloudprovider', verbose_name='Nextcloud provider')),
            ],
            options={
                'verbose_name': 'Digital product',
                'verbose_name_plural': 'Digital products',
            },
        ),
        migrations.AddField(
            model_name='item',
            name='digital_product_object',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='order.digitalproduct', verbose_name='Digital product'),
        ),
    ]
