# Generated by Django 3.1 on 2021-04-08 06:36

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('organization', '__first__'),
    ]

    operations = [
        migrations.CreateModel(
            name='Voucher',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('voucher_id', models.CharField(max_length=32)),
                ('posted_date', models.DateTimeField()),
                ('available_date', models.DateTimeField()),
                ('expiry_date', models.DateTimeField()),
                ('name', models.CharField(max_length=128)),
                ('voucher_type', models.CharField(max_length=32)),
                ('description', models.TextField(blank=True)),
                ('counter', models.PositiveIntegerField()),
                ('image', models.ImageField(upload_to='assets')),
                ('organization', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='voucher_to_organization', to='organization.organization')),
            ],
        ),
        migrations.CreateModel(
            name='Email',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('email', models.CharField(max_length=40)),
                ('voucher', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='voucher.voucher')),
            ],
        ),
        migrations.CreateModel(
            name='Code',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(max_length=128)),
                ('voucher', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='voucher.voucher')),
            ],
            options={
                'ordering': ['code'],
            },
        ),
    ]
