# Generated by Django 3.1.5 on 2021-02-08 14:56

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Block',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, choices=[('s', 's'), ('p', 'p'), ('d', 'd'), ('f', 'f')], max_length=30, null=True, unique=True)),
            ],
            options={
                'verbose_name': 'Block',
            },
        ),
        migrations.CreateModel(
            name='Period',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.IntegerField(blank=True, null=True, unique=True)),
            ],
            options={
                'verbose_name': 'Period',
            },
        ),
        migrations.CreateModel(
            name='Group',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.IntegerField(blank=True, null=True, unique=True)),
                ('block', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='groups', to='Element.block')),
            ],
            options={
                'verbose_name': 'Group',
            },
        ),
        migrations.CreateModel(
            name='Element',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('atomic_number', models.IntegerField(blank=True, null=True)),
                ('name', models.CharField(max_length=200)),
                ('symbol', models.CharField(blank=True, max_length=20, null=True)),
                ('atomic_mass', models.FloatField(blank=True, null=True)),
                ('nn', models.IntegerField(blank=True, null=True, verbose_name='No of Neutrons')),
                ('np', models.IntegerField(blank=True, null=True, verbose_name='No of Protons')),
                ('ne', models.IntegerField(blank=True, null=True, verbose_name='No of Electrons')),
                ('phase', models.CharField(choices=[('Solid', 'Solid'), ('Gas', 'Gas'), ('Liquid', 'Liquid'), ('Artificial', 'Artificial')], max_length=30)),
                ('radioactive', models.BooleanField(default=False)),
                ('natural', models.BooleanField(default=False)),
                ('metal', models.BooleanField(default=False)),
                ('non_metal', models.BooleanField(default=False)),
                ('metalloid', models.BooleanField(default=False)),
                ('_type', models.CharField(blank=True, choices=[('Alkali Metal', 'Alkali Metal'), ('Alkaline Earth Metal', 'Alkaline Earth Metal'), ('Transition Metal', 'Transition Metal'), ('Actinide', 'Actinide'), ('Lanthanide', 'Lanthanide'), ('Post Transition Metal', 'Post Transition Metal'), ('Other Non Metal', 'Other Non Metal'), ('Metalloid', 'Metalloid'), ('Noble Gas', 'Noble Gas'), ('Halogen', 'Halogen')], max_length=30, null=True)),
                ('color', models.CharField(blank=True, max_length=30, null=True)),
                ('atomic_radius', models.FloatField(blank=True, null=True)),
                ('electronegativity', models.FloatField(blank=True, null=True)),
                ('first_ionization', models.FloatField(blank=True, null=True)),
                ('density', models.FloatField(blank=True, null=True)),
                ('melting_point', models.FloatField(blank=True, null=True)),
                ('boiling_point', models.FloatField(blank=True, null=True)),
                ('ns', models.IntegerField(blank=True, default=0, verbose_name='Number of Isotopes')),
                ('discovered_by', models.CharField(blank=True, default='', max_length=200)),
                ('year', models.IntegerField(blank=True, null=True, verbose_name='Year of Discovery')),
                ('specific_heat', models.FloatField(blank=True, null=True)),
                ('shells', models.IntegerField(blank=True, null=True, verbose_name='Number of Shells')),
                ('valence', models.IntegerField(blank=True, null=True)),
                ('block', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='elements', to='Element.block')),
                ('group', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='elements', to='Element.group')),
                ('period', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='Element.period')),
            ],
            options={
                'verbose_name': 'Periodic Table Elements',
                'verbose_name_plural': 'Periodic Table Elements',
                'ordering': ['atomic_number'],
                'unique_together': {('atomic_number', 'group')},
            },
        ),
    ]
