# Generated by Django 3.1.2 on 2020-10-21 09:30

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Device',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.TextField(help_text="Example: 'Nexus 5X', 'Nexus 6P'", max_length=100)),
                ('codename', models.TextField(help_text="Example: 'bullhead', 'angler'", max_length=20)),
                ('manufacturer', models.TextField(help_text="Example: 'LG', 'Huawei'", max_length=20)),
                ('CPU', models.TextField(help_text="Example: 'MSM8992', 'MSM8994'", max_length=20)),
                ('GPU', models.TextField(help_text="Example: 'Adreno 418', 'Adreno 430'", max_length=20)),
                ('memory', models.IntegerField(help_text="RAM amount. Set to lowest value if device has multiple SKUs.<br>Example: '2' if device ships with 2 or 3 GB of RAM")),
                ('storage', models.IntegerField(help_text="Storage amount. Set to lowest value if device has multiple SKUs.<br>Example: '32' if device ships with 32 or 64 GB of storage")),
                ('photo', models.URLField(help_text='URL to image of device.<br>Preferably grab an image from <a href="https://www.gsmarena.com" target="_blank">GSMArena.</a><br>Example: \'https://fdn2.gsmarena.com/vv/bigpic/lg-nexus-5x-.jpg\', \'https://fdn2.gsmarena.com/vv/bigpic/huawei-nexus-6p-.jpg\'')),
                ('status', models.BooleanField(default=True, help_text='Device is still maintained - uncheck if abandoned')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('maintainers', models.ManyToManyField(blank=True, help_text='Choose the maintainers working on this device. Multiple maintainers can be selected.<br>', related_name='devices', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Build',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('file_name', models.TextField(help_text="Example: 'Bliss-v12.8-bullhead-OFFICIAL-20200608", max_length=500, unique=True)),
                ('size', models.IntegerField(help_text='Size of zip file in bytes<br>Example: 857483855')),
                ('version', models.TextField(help_text='Example: v12.8', max_length=20)),
                ('sha256sum', models.TextField(max_length=64)),
                ('gapps', models.BooleanField(default=False, help_text='Does the build include GApps?')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('processed', models.BooleanField(default=False)),
                ('zip_file', models.FileField(upload_to=shipper.models.Build.get_upload_path)),
                ('md5_file', models.FileField(upload_to=shipper.models.Build.get_upload_path)),
                ('device', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='builds', to='shipper.device')),
            ],
        ),
    ]
