# Generated by Django 3.1.3 on 2020-12-19 05:18

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Hostel',
            fields=[
                ('hostel_name', models.CharField(max_length=30, primary_key=True, serialize=False)),
                ('no_of_rooms', models.IntegerField()),
                ('no_of_students', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Room',
            fields=[
                ('room_name', models.CharField(max_length=10, primary_key=True, serialize=False)),
                ('capacity', models.IntegerField()),
                ('hostel', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='hostel_room', to='hostel.hostel')),
            ],
        ),
        migrations.CreateModel(
            name='Student',
            fields=[
                ('USN', models.CharField(max_length=15, primary_key=True, serialize=False)),
                ('student_name', models.CharField(max_length=30)),
                ('dob', models.DateField(help_text='format : YYYY-MM-DD', max_length=10, null=True)),
                ('gender', models.CharField(choices=[('N', 'None'), ('M', 'Male'), ('F', 'Female')], default='N', max_length=1, null=True)),
                ('student_branch', models.CharField(max_length=30)),
                ('student_phone', models.CharField(max_length=10)),
                ('student_age', models.IntegerField()),
                ('address_area', models.CharField(max_length=100)),
                ('address_city', models.CharField(max_length=40)),
                ('address_state', models.CharField(max_length=40)),
                ('pincode', models.CharField(max_length=10)),
                ('hostel', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='hostel_students', to='hostel.hostel')),
                ('room', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='room_students', to='hostel.room')),
            ],
        ),
        migrations.CreateModel(
            name='Visitors',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('out_time', models.DateTimeField()),
                ('in_time', models.DateTimeField()),
                ('visitor_phone', models.CharField(max_length=13)),
                ('visitor_name', models.CharField(max_length=30)),
                ('student', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='student_visitors', to='hostel.student')),
            ],
            options={
                'verbose_name': 'Visitor',
            },
        ),
        migrations.CreateModel(
            name='Staff',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('staff_id', models.CharField(max_length=10, unique=True)),
                ('staff_name', models.CharField(max_length=30)),
                ('staff_duty', models.CharField(max_length=30)),
                ('hostel', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='hostel_staff', to='hostel.hostel')),
            ],
        ),
        migrations.CreateModel(
            name='Parents',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('father_name', models.CharField(max_length=30)),
                ('mother_name', models.CharField(max_length=30)),
                ('father_phone', models.CharField(max_length=15)),
                ('mother_phone', models.CharField(max_length=15)),
                ('student', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='student_parents', to='hostel.student')),
            ],
            options={
                'verbose_name': 'Parent',
            },
        ),
        migrations.CreateModel(
            name='Fees',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('room_fees_amt', models.CharField(max_length=10)),
                ('fees_status', models.CharField(max_length=10)),
                ('student', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='student_fees', to='hostel.student')),
            ],
            options={
                'verbose_name': 'Fee',
            },
        ),
    ]
