# Generated by Django 2.2.7 on 2019-11-27 15:04

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='App',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200, verbose_name='name')),
                ('icon', models.ImageField(blank=True, null=True, upload_to='uploads/distribution/app', verbose_name='icon')),
                ('description', models.TextField(blank=True, null=True, verbose_name='description')),
                ('created', models.DateTimeField(auto_now_add=True, verbose_name='created')),
                ('updated', models.DateTimeField(auto_now=True, verbose_name='updated')),
            ],
        ),
        migrations.CreateModel(
            name='Version',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('platform', models.CharField(choices=[('android', 'android'), ('ios', 'ios')], default='android', max_length=20, verbose_name='platform')),
                ('name', models.CharField(max_length=50, verbose_name='version name')),
                ('number', models.SmallIntegerField(default=1, verbose_name='version number')),
                ('content', models.TextField(blank=True, null=True, verbose_name='content')),
                ('url', models.URLField(blank=True, null=True, verbose_name='download url')),
                ('created', models.DateTimeField(auto_now_add=True, verbose_name='created')),
                ('app', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='distribution.App')),
            ],
            options={
                'ordering': ['-number'],
            },
        ),
    ]
