# Generated by Django 3.0.8 on 2020-09-02 12:20

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='GrupKandidat',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('group_name', models.CharField(max_length=100)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'GrupKandidat',
                'verbose_name_plural': 'GrupKandidats',
            },
        ),
        migrations.CreateModel(
            name='Kandidat',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nama', models.CharField(max_length=255)),
                ('deskripsi', models.TextField()),
                ('suara', models.IntegerField(default=0)),
                ('foto', models.FileField(null=True, upload_to='images/')),
                ('published', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('grup', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='e_admin.GrupKandidat')),
            ],
            options={
                'verbose_name': 'Kandidat',
                'verbose_name_plural': 'Kandidats',
            },
        ),
    ]
