cdc-placement-website-backend/CDC_Backend/APIs/migrations/0001_initial.py

342 lines
26 KiB
Python

# Generated by Django 3.2.13 on 2023-07-09 20:05
import APIs.models
from django.conf import settings
import django.contrib.postgres.fields
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import simple_history.models
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='Contributor',
fields=[
('id', models.AutoField(primary_key=True, serialize=False)),
('name', models.CharField(default='', max_length=50)),
('email', models.EmailField(default='', max_length=50, unique=True)),
('github_id', models.CharField(default='', max_length=50, unique=True)),
('linkedin', models.CharField(max_length=50, null=True, unique=True)),
('commits', models.IntegerField(default=0)),
('image', models.CharField(default='', max_length=50, null=True)),
],
),
migrations.CreateModel(
name='User',
fields=[
('email', models.EmailField(max_length=100, primary_key=True, serialize=False)),
('id', models.CharField(db_index=True, max_length=25)),
('user_type', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=10), default=list, size=4)),
('last_login_time', models.DateTimeField(default=django.utils.timezone.now)),
],
options={
'verbose_name_plural': 'User',
'unique_together': {('email', 'id')},
},
),
migrations.CreateModel(
name='Student',
fields=[
('id', models.CharField(max_length=15, primary_key=True, serialize=False)),
('roll_no', models.IntegerField()),
('name', models.CharField(max_length=100)),
('batch', models.CharField(choices=[['2021', '2021'], ['2020', '2020'], ['2019', '2019'], ['2018', '2018'], ['2017', '2017']], max_length=10)),
('branch', models.CharField(choices=[['CSE', 'CSE'], ['EE', 'EE'], ['ME', 'ME'], ['MMAE', 'MMAE'], ['EP', 'EP']], max_length=10)),
('phone_number', models.PositiveBigIntegerField(blank=True, default=None, null=True)),
('resumes', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(default=None, max_length=100, null=True), blank=True, default=list, size=10)),
('cpi', models.DecimalField(decimal_places=2, max_digits=4)),
('can_apply', models.BooleanField(default=True, verbose_name='Registered')),
('degree', models.CharField(choices=[['bTech', 'B.Tech'], ['ms/phd', 'MS/ PhD']], default='bTech', max_length=10)),
('changed_by', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.RESTRICT, to='APIs.user')),
],
),
migrations.CreateModel(
name='PrePlacementOffer',
fields=[
('id', models.AutoField(primary_key=True, serialize=False)),
('company', models.CharField(default='', max_length=50, verbose_name='Company Name')),
('compensation', models.IntegerField()),
('compensation_details', models.CharField(blank=True, max_length=200)),
('tier', models.CharField(choices=[['psu', 'PSU'], ['1', 'Tier 1'], ['2', 'Tier 2'], ['3', 'Tier 3'], ['4', 'Tier 4'], ['5', 'Tier 5'], ['6', 'Tier 6'], ['7', 'Tier 7']], max_length=10)),
('designation', models.CharField(default=None, max_length=100, null=True)),
('accepted', models.BooleanField(default=None, null=True)),
('changed_by', models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.RESTRICT, to='APIs.user')),
('student', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='APIs.student')),
],
),
migrations.CreateModel(
name='Placement',
fields=[
('id', models.CharField(max_length=15, primary_key=True, serialize=False)),
('company_name', models.CharField(max_length=50)),
('address', models.CharField(max_length=1000)),
('company_type', models.CharField(max_length=50)),
('nature_of_business', models.CharField(default='', max_length=50)),
('type_of_organisation', models.CharField(default='', max_length=50)),
('website', models.CharField(blank=True, max_length=100)),
('company_details', models.CharField(blank=True, default=None, max_length=1000, null=True)),
('company_details_pdf_names', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(default=None, max_length=100, null=True), blank=True, default=list, size=5)),
('is_company_details_pdf', models.BooleanField(default=False)),
('contact_person_name', models.CharField(max_length=100)),
('phone_number', models.PositiveBigIntegerField()),
('email', models.CharField(default='', max_length=50)),
('city', models.CharField(default='', max_length=50)),
('state', models.CharField(default='', max_length=50)),
('country', models.CharField(default='', max_length=50)),
('pin_code', models.IntegerField(default=None, null=True)),
('city_type', models.CharField(choices=[['Domestic', 'Domestic'], ['International', 'International']], max_length=15)),
('designation', models.CharField(default=None, max_length=100, null=True)),
('description', models.CharField(default=None, max_length=1000, null=True)),
('job_location', models.CharField(default='', max_length=50)),
('description_pdf_names', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(default=None, max_length=100, null=True), blank=True, default=list, size=5)),
('is_description_pdf', models.BooleanField(default=False)),
('compensation_CTC', models.IntegerField(default=None, null=True)),
('compensation_gross', models.IntegerField(default=None, null=True)),
('compensation_take_home', models.IntegerField(default=None, null=True)),
('compensation_bonus', models.IntegerField(blank=True, default=None, null=True)),
('compensation_details_pdf_names', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(default=None, max_length=100, null=True), blank=True, default=list, size=5)),
('is_compensation_details_pdf', models.BooleanField(default=False)),
('bond_details', models.CharField(blank=True, max_length=1000)),
('selection_procedure_rounds', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(default=None, max_length=100, null=True), blank=True, default=list, size=10)),
('selection_procedure_details', models.CharField(blank=True, max_length=1000)),
('selection_procedure_details_pdf_names', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(default=None, max_length=100, null=True), blank=True, default=list, size=5)),
('is_selection_procedure_details_pdf', models.BooleanField(default=False)),
('tier', models.CharField(choices=[['psu', 'PSU'], ['1', 'Tier 1'], ['2', 'Tier 2'], ['3', 'Tier 3'], ['4', 'Tier 4'], ['5', 'Tier 5'], ['6', 'Tier 6'], ['7', 'Tier 7']], default=None, max_length=10, null=True)),
('tentative_date_of_joining', models.DateField(default=django.utils.timezone.now, verbose_name='Tentative Date')),
('allowed_batch', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(choices=[['2021', '2021'], ['2020', '2020'], ['2019', '2019'], ['2018', '2018'], ['2017', '2017']], max_length=10), default=list, size=5)),
('allowed_branch', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(choices=[['CSE', 'CSE'], ['EE', 'EE'], ['ME', 'ME'], ['MMAE', 'MMAE'], ['EP', 'EP']], max_length=10), default=list, size=4)),
('tentative_no_of_offers', models.IntegerField(default=None, null=True)),
('rs_eligible', models.BooleanField(default=False)),
('other_requirements', models.CharField(blank=True, default='', max_length=1000)),
('additional_info', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(blank=True, max_length=200), blank=True, default=list, size=15)),
('email_verified', models.BooleanField(default=False)),
('offer_accepted', models.BooleanField(default=None, null=True)),
('deadline_datetime', models.DateTimeField(default=APIs.models.two_day_after_today, verbose_name='Deadline Date')),
('created_at', models.DateTimeField(default=None, null=True)),
('updated_at', models.DateTimeField(default=None, null=True)),
('changed_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='APIs.user')),
],
),
migrations.CreateModel(
name='HistoricalUser',
fields=[
('email', models.EmailField(db_index=True, max_length=100)),
('id', models.CharField(db_index=True, max_length=25)),
('user_type', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=10), default=list, size=4)),
('last_login_time', models.DateTimeField(default=django.utils.timezone.now)),
('history_id', models.AutoField(primary_key=True, serialize=False)),
('history_date', models.DateTimeField(db_index=True)),
('history_change_reason', models.CharField(max_length=100, null=True)),
('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
],
options={
'verbose_name': 'historical user',
'verbose_name_plural': 'historical User',
'ordering': ('-history_date', '-history_id'),
'get_latest_by': ('history_date', 'history_id'),
},
bases=(simple_history.models.HistoricalChanges, models.Model),
),
migrations.CreateModel(
name='HistoricalStudent',
fields=[
('id', models.CharField(db_index=True, max_length=15)),
('roll_no', models.IntegerField()),
('name', models.CharField(max_length=100)),
('batch', models.CharField(choices=[['2021', '2021'], ['2020', '2020'], ['2019', '2019'], ['2018', '2018'], ['2017', '2017']], max_length=10)),
('branch', models.CharField(choices=[['CSE', 'CSE'], ['EE', 'EE'], ['ME', 'ME'], ['MMAE', 'MMAE'], ['EP', 'EP']], max_length=10)),
('phone_number', models.PositiveBigIntegerField(blank=True, default=None, null=True)),
('resumes', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(default=None, max_length=100, null=True), blank=True, default=list, size=10)),
('cpi', models.DecimalField(decimal_places=2, max_digits=4)),
('can_apply', models.BooleanField(default=True, verbose_name='Registered')),
('degree', models.CharField(choices=[['bTech', 'B.Tech'], ['ms/phd', 'MS/ PhD']], default='bTech', max_length=10)),
('history_id', models.AutoField(primary_key=True, serialize=False)),
('history_date', models.DateTimeField(db_index=True)),
('history_change_reason', models.CharField(max_length=100, null=True)),
('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
('changed_by', models.ForeignKey(blank=True, db_constraint=False, default=None, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='APIs.user')),
('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='APIs.user')),
],
options={
'verbose_name': 'historical student',
'verbose_name_plural': 'historical students',
'ordering': ('-history_date', '-history_id'),
'get_latest_by': ('history_date', 'history_id'),
},
bases=(simple_history.models.HistoricalChanges, models.Model),
),
migrations.CreateModel(
name='HistoricalPrePlacementOffer',
fields=[
('id', models.IntegerField(blank=True, db_index=True)),
('company', models.CharField(default='', max_length=50, verbose_name='Company Name')),
('compensation', models.IntegerField()),
('compensation_details', models.CharField(blank=True, max_length=200)),
('tier', models.CharField(choices=[['psu', 'PSU'], ['1', 'Tier 1'], ['2', 'Tier 2'], ['3', 'Tier 3'], ['4', 'Tier 4'], ['5', 'Tier 5'], ['6', 'Tier 6'], ['7', 'Tier 7']], max_length=10)),
('designation', models.CharField(default=None, max_length=100, null=True)),
('accepted', models.BooleanField(default=None, null=True)),
('history_id', models.AutoField(primary_key=True, serialize=False)),
('history_date', models.DateTimeField(db_index=True)),
('history_change_reason', models.CharField(max_length=100, null=True)),
('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
('changed_by', models.ForeignKey(blank=True, db_constraint=False, default=None, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='APIs.user')),
('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='APIs.user')),
('student', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='APIs.student')),
],
options={
'verbose_name': 'historical pre placement offer',
'verbose_name_plural': 'historical pre placement offers',
'ordering': ('-history_date', '-history_id'),
'get_latest_by': ('history_date', 'history_id'),
},
bases=(simple_history.models.HistoricalChanges, models.Model),
),
migrations.CreateModel(
name='HistoricalPlacementApplication',
fields=[
('id', models.CharField(db_index=True, max_length=15)),
('resume', models.CharField(default=None, max_length=100, null=True)),
('additional_info', models.JSONField(blank=True, default=None, null=True)),
('selected', models.BooleanField(blank=True, default=None, null=True)),
('applied_at', models.DateTimeField(default=None, null=True)),
('updated_at', models.DateTimeField(default=None, null=True)),
('history_id', models.AutoField(primary_key=True, serialize=False)),
('history_date', models.DateTimeField(db_index=True)),
('history_change_reason', models.CharField(max_length=100, null=True)),
('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
('changed_by', models.ForeignKey(blank=True, db_constraint=False, default=None, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='APIs.user')),
('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='APIs.user')),
('placement', models.ForeignKey(blank=True, db_constraint=False, default=None, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='APIs.placement')),
('student', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='APIs.student')),
],
options={
'verbose_name': 'historical placement application',
'verbose_name_plural': 'historical Placement Applications',
'ordering': ('-history_date', '-history_id'),
'get_latest_by': ('history_date', 'history_id'),
},
bases=(simple_history.models.HistoricalChanges, models.Model),
),
migrations.CreateModel(
name='HistoricalPlacement',
fields=[
('id', models.CharField(db_index=True, max_length=15)),
('company_name', models.CharField(max_length=50)),
('address', models.CharField(max_length=1000)),
('company_type', models.CharField(max_length=50)),
('nature_of_business', models.CharField(default='', max_length=50)),
('type_of_organisation', models.CharField(default='', max_length=50)),
('website', models.CharField(blank=True, max_length=100)),
('company_details', models.CharField(blank=True, default=None, max_length=1000, null=True)),
('company_details_pdf_names', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(default=None, max_length=100, null=True), blank=True, default=list, size=5)),
('is_company_details_pdf', models.BooleanField(default=False)),
('contact_person_name', models.CharField(max_length=100)),
('phone_number', models.PositiveBigIntegerField()),
('email', models.CharField(default='', max_length=50)),
('city', models.CharField(default='', max_length=50)),
('state', models.CharField(default='', max_length=50)),
('country', models.CharField(default='', max_length=50)),
('pin_code', models.IntegerField(default=None, null=True)),
('city_type', models.CharField(choices=[['Domestic', 'Domestic'], ['International', 'International']], max_length=15)),
('designation', models.CharField(default=None, max_length=100, null=True)),
('description', models.CharField(default=None, max_length=1000, null=True)),
('job_location', models.CharField(default='', max_length=50)),
('description_pdf_names', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(default=None, max_length=100, null=True), blank=True, default=list, size=5)),
('is_description_pdf', models.BooleanField(default=False)),
('compensation_CTC', models.IntegerField(default=None, null=True)),
('compensation_gross', models.IntegerField(default=None, null=True)),
('compensation_take_home', models.IntegerField(default=None, null=True)),
('compensation_bonus', models.IntegerField(blank=True, default=None, null=True)),
('compensation_details_pdf_names', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(default=None, max_length=100, null=True), blank=True, default=list, size=5)),
('is_compensation_details_pdf', models.BooleanField(default=False)),
('bond_details', models.CharField(blank=True, max_length=1000)),
('selection_procedure_rounds', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(default=None, max_length=100, null=True), blank=True, default=list, size=10)),
('selection_procedure_details', models.CharField(blank=True, max_length=1000)),
('selection_procedure_details_pdf_names', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(default=None, max_length=100, null=True), blank=True, default=list, size=5)),
('is_selection_procedure_details_pdf', models.BooleanField(default=False)),
('tier', models.CharField(choices=[['psu', 'PSU'], ['1', 'Tier 1'], ['2', 'Tier 2'], ['3', 'Tier 3'], ['4', 'Tier 4'], ['5', 'Tier 5'], ['6', 'Tier 6'], ['7', 'Tier 7']], default=None, max_length=10, null=True)),
('tentative_date_of_joining', models.DateField(default=django.utils.timezone.now, verbose_name='Tentative Date')),
('allowed_batch', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(choices=[['2021', '2021'], ['2020', '2020'], ['2019', '2019'], ['2018', '2018'], ['2017', '2017']], max_length=10), default=list, size=5)),
('allowed_branch', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(choices=[['CSE', 'CSE'], ['EE', 'EE'], ['ME', 'ME'], ['MMAE', 'MMAE'], ['EP', 'EP']], max_length=10), default=list, size=4)),
('tentative_no_of_offers', models.IntegerField(default=None, null=True)),
('rs_eligible', models.BooleanField(default=False)),
('other_requirements', models.CharField(blank=True, default='', max_length=1000)),
('additional_info', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(blank=True, max_length=200), blank=True, default=list, size=15)),
('email_verified', models.BooleanField(default=False)),
('offer_accepted', models.BooleanField(default=None, null=True)),
('deadline_datetime', models.DateTimeField(default=APIs.models.two_day_after_today, verbose_name='Deadline Date')),
('created_at', models.DateTimeField(default=None, null=True)),
('updated_at', models.DateTimeField(default=None, null=True)),
('history_id', models.AutoField(primary_key=True, serialize=False)),
('history_date', models.DateTimeField(db_index=True)),
('history_change_reason', models.CharField(max_length=100, null=True)),
('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
('changed_by', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='APIs.user')),
('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='APIs.user')),
],
options={
'verbose_name': 'historical placement',
'verbose_name_plural': 'historical placements',
'ordering': ('-history_date', '-history_id'),
'get_latest_by': ('history_date', 'history_id'),
},
bases=(simple_history.models.HistoricalChanges, models.Model),
),
migrations.CreateModel(
name='HistoricalAdmin',
fields=[
('id', models.CharField(db_index=True, max_length=15)),
('name', models.CharField(max_length=100)),
('history_id', models.AutoField(primary_key=True, serialize=False)),
('history_date', models.DateTimeField(db_index=True)),
('history_change_reason', models.CharField(max_length=100, null=True)),
('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
('changed_by', models.ForeignKey(blank=True, db_constraint=False, default=None, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='APIs.user')),
('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='APIs.user')),
],
options={
'verbose_name': 'historical admin',
'verbose_name_plural': 'historical admins',
'ordering': ('-history_date', '-history_id'),
'get_latest_by': ('history_date', 'history_id'),
},
bases=(simple_history.models.HistoricalChanges, models.Model),
),
migrations.CreateModel(
name='Admin',
fields=[
('id', models.CharField(max_length=15, primary_key=True, serialize=False)),
('name', models.CharField(max_length=100)),
('changed_by', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.RESTRICT, to='APIs.user')),
],
),
migrations.CreateModel(
name='PlacementApplication',
fields=[
('id', models.CharField(max_length=15, primary_key=True, serialize=False)),
('resume', models.CharField(default=None, max_length=100, null=True)),
('additional_info', models.JSONField(blank=True, default=None, null=True)),
('selected', models.BooleanField(blank=True, default=None, null=True)),
('applied_at', models.DateTimeField(default=None, null=True)),
('updated_at', models.DateTimeField(default=None, null=True)),
('changed_by', models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.RESTRICT, to='APIs.user')),
('placement', models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.RESTRICT, to='APIs.placement')),
('student', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='APIs.student')),
],
options={
'verbose_name_plural': 'Placement Applications',
'unique_together': {('placement_id', 'student_id')},
},
),
]