Fakultas Ilmu Komputer UI

0001_initial.py 13.3 KB
Newer Older
MISAEL JONATHAN's avatar
MISAEL JONATHAN committed
1
# Generated by Django 2.2.8 on 2019-12-06 15:30
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34

import core.lib.validators
import core.models.accounts
from django.conf import settings
import django.core.validators
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='Application',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cover_letter', models.TextField(blank=True, null=True)),
                ('status', models.IntegerField(default=0)),
            ],
        ),
        migrations.CreateModel(
            name='Company',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('description', models.TextField()),
35
                ('founded', models.DateField(blank=True, null=True)),
Muhammad Fauzan Fikri's avatar
Muhammad Fauzan Fikri committed
36
                ('status', models.IntegerField(default=0, validators=[django.core.validators.MaxValueValidator(2), django.core.validators.MinValueValidator(0)])),
37
38
                ('logo', models.FileField(blank=True, null=True, upload_to=core.models.accounts.get_company_logo_file_path, validators=[core.lib.validators.validate_image_file_extension])),
                ('address', models.CharField(blank=True, max_length=1000, null=True)),
39
                ('category', models.CharField(default='Belum ada kategori perusahaan', max_length=140)),
40
                ('size', models.IntegerField(default=1, validators=[django.core.validators.MinValueValidator(1)])),
41
                ('website', models.CharField(default='Belum ada link website', max_length=100)),
42
                ('linkedin_url', models.URLField(blank=True, null=True)),
43
44
45
46
47
48
49
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-updated'],
            },
        ),
        migrations.CreateModel(
Fannyah Dita Cahya's avatar
Fannyah Dita Cahya committed
50
            name='Recommendation',
51
52
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
Fannyah Dita Cahya's avatar
Fannyah Dita Cahya committed
53
                ('content', models.TextField(blank=True)),
54
                ('created', models.DateTimeField(auto_now_add=True)),
Fannyah Dita Cahya's avatar
Fannyah Dita Cahya committed
55
                ('updated', models.DateTimeField(auto_now=True)),
56
57
            ],
            options={
Fannyah Dita Cahya's avatar
Fannyah Dita Cahya committed
58
                'ordering': ['-updated'],
59
60
            },
        ),
61
        migrations.CreateModel(
Fannyah Dita Cahya's avatar
Fannyah Dita Cahya committed
62
            name='Vacancy',
63
64
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
Fannyah Dita Cahya's avatar
Fannyah Dita Cahya committed
65
66
67
68
69
70
                ('verified', models.BooleanField(default=False)),
                ('open_time', models.DateTimeField()),
                ('description', models.TextField(blank=True)),
                ('requirements', models.TextField(blank=True)),
                ('responsibilities', models.TextField(blank=True)),
                ('close_time', models.DateTimeField()),
71
72
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
Fannyah Dita Cahya's avatar
Fannyah Dita Cahya committed
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
                ('name', models.CharField(max_length=100)),
                ('amount', models.IntegerField(null=True)),
                ('max_accepted_applicants', models.IntegerField(default=0)),
                ('benefits', models.TextField(blank=True)),
                ('working_period', models.CharField(max_length=100, null=True)),
                ('tag', models.TextField(blank=True)),
                ('salary', models.IntegerField(default=0)),
                ('recruiter_activity', models.CharField(blank=True, max_length=10, null=True)),
                ('office_address', models.TextField(blank=True, default='')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='vacancies', to='core.Company')),
            ],
            options={
                'ordering': ['-updated'],
            },
        ),
        migrations.CreateModel(
            name='ReasonRejected',
            fields=[
                ('application', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='core.Application')),
                ('reason', models.TextField(default='Tidak memenuhi kualifikasi perusahaan.')),
            ],
        ),
        migrations.CreateModel(
            name='VacancyMilestone',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('detail', models.TextField()),
                ('expected_start', models.DateField()),
                ('expected_finish', models.DateField()),
                ('vacancy', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='milestones', to='core.Vacancy')),
            ],
        ),
        migrations.CreateModel(
            name='Supervisor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('nip', models.IntegerField(unique=True, validators=[django.core.validators.MinValueValidator(100000000), django.core.validators.MaxValueValidator(9999999999)])),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
114
115
116
117
118
            ],
            options={
                'ordering': ['-updated'],
            },
        ),
119
120
121
122
123
124
125
        migrations.CreateModel(
            name='Student',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('npm', models.IntegerField(unique=True, validators=[core.lib.validators.validate_npm])),
126
                ('resume', models.FileField(blank=True, null=True, upload_to=core.models.accounts.get_student_resume_file_path, validators=[django.core.validators.FileExtensionValidator(['pdf'])])),
127
                ('sertifikat', models.FileField(blank=True, null=True, upload_to=core.models.accounts.get_student_sertifikat_file_path, validators=[core.lib.validators.validate_document_file_extension])),
128
                ('phone_number', models.CharField(blank=True, db_index=True, max_length=100, null=True, validators=[django.core.validators.RegexValidator('^0\\d{1,11}$')])),
129
130
131
132
133
134
                ('gender', models.CharField(blank=True, max_length=30, null=True)),
                ('birth_place', models.CharField(blank=True, max_length=30, null=True)),
                ('birth_date', models.DateField(blank=True, null=True)),
                ('major', models.CharField(blank=True, max_length=30, null=True)),
                ('batch', models.CharField(blank=True, max_length=4, null=True)),
                ('show_transcript', models.BooleanField(default=False)),
135
                ('photo', models.FileField(blank=True, null=True, upload_to=core.models.accounts.get_student_photo_file_path, validators=[django.core.validators.FileExtensionValidator(['jpg', 'jpeg', 'png'])])),
136
137
138
139
140
141
                ('self_description', models.CharField(blank=True, db_index=True, max_length=500, null=True)),
                ('portfolio_link', models.URLField(blank=True, null=True)),
                ('linkedin_url', models.URLField(blank=True, null=True)),
                ('hackerrank_url', models.URLField(blank=True, null=True)),
                ('website_url', models.URLField(blank=True, null=True)),
                ('work_experience', models.CharField(blank=True, max_length=500, null=True)),
MISAEL JONATHAN's avatar
MISAEL JONATHAN committed
142
                ('region', models.CharField(blank=True, max_length=30, null=True, validators=[django.core.validators.RegexValidator('^[A-Za-z]+$')])),
143
144
145
146
147
148
                ('alamat', models.CharField(blank=True, max_length=50, null=True)),
                ('skills', models.CharField(blank=True, max_length=50, null=True)),
                ('ui_ux_portofolio', models.FileField(blank=True, null=True, upload_to=core.models.accounts.get_student_ui_ux_portofolio_file_path, validators=[core.lib.validators.validate_document_file_extension])),
                ('latest_work', models.CharField(blank=True, max_length=100, null=True)),
                ('latest_work_desc', models.TextField(blank=True, null=True)),
                ('github_url', models.URLField(blank=True, null=True)),
RANI LASMA ULI's avatar
RANI LASMA ULI committed
149
                ('gitlab_url', models.URLField(blank=True, null=True)),
150
                ('intro', models.CharField(blank=True, max_length=50, null=True)),
151
                ('expected_salary', models.CharField(blank=True, max_length=10, null=True, validators=[django.core.validators.RegexValidator('^\\d{0,10}$')])),
152
                ('job_seeking_status', models.CharField(blank=True, max_length=30, null=True)),
153
                ('student_gpa', models.FloatField(blank=True, db_column='student_gpa', default=1.0, null=True, validators=[core.lib.validators.validate_student_gpa])),
154
                ('student_toefl', models.IntegerField(blank=True, db_column='toefl', default=0, null=True, validators=[core.lib.validators.validate_toefl_score])),
Fannyah Dita Cahya's avatar
Fannyah Dita Cahya committed
155
                ('student_toefl_file', models.FileField(blank=True, null=True, upload_to=core.models.accounts.get_student_toefl_file_path, validators=[django.core.validators.FileExtensionValidator(['pdf'])])),
156
157
158
159
                ('volunteer', models.CharField(blank=True, max_length=100, null=True)),
                ('awards', models.CharField(blank=True, max_length=100, null=True)),
                ('projects', models.CharField(blank=True, max_length=100, null=True)),
                ('certification', models.CharField(blank=True, max_length=100, null=True)),
MISAEL JONATHAN's avatar
MISAEL JONATHAN committed
160
                ('languages', models.CharField(blank=True, max_length=100, null=True, validators=[core.lib.validators.validate_languages_contains_string_type_value])),
161
162
                ('seminar', models.CharField(blank=True, max_length=100, null=True)),
                ('interests', models.CharField(blank=True, max_length=100, null=True)),
163
                ('dependants', models.IntegerField(blank=True, db_column='dependants', default=0, null=True)),
Farah Alhaniy Efendi's avatar
Farah Alhaniy Efendi committed
164
                ('related_course', models.CharField(blank=True, max_length=200, null=True)),
165
                ('ielts', models.FloatField(blank=True, db_column='ielts', default=1.0, null=True)),
Fannyah Dita Cahya's avatar
Fannyah Dita Cahya committed
166
167
168
                ('applied_vacancies', models.ManyToManyField(blank=True, related_name='applied_vacancies', through='core.Application', to='core.Vacancy')),
                ('bookmarked_vacancies', models.ManyToManyField(blank=True, related_name='bookmarked_vacancies', to='core.Vacancy')),
                ('recommendations', models.ManyToManyField(blank=True, related_name='recommendations', to='core.Recommendation')),
169
170
171
172
173
174
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-updated'],
            },
        ),
175
176
177
        migrations.AddField(
            model_name='recommendation',
            name='recommendation_giver',
Muhammad Fauzan Fikri's avatar
Muhammad Fauzan Fikri committed
178
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='giver', to='core.Student'),
179
180
181
182
        ),
        migrations.AddField(
            model_name='recommendation',
            name='recommendation_receiver',
Muhammad Fauzan Fikri's avatar
Muhammad Fauzan Fikri committed
183
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='receiver', to='core.Student'),
184
        ),
Fannyah Dita Cahya's avatar
Fannyah Dita Cahya committed
185
186
187
188
189
190
191
192
193
194
195
196
197
        migrations.CreateModel(
            name='Feedback',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('title', models.CharField(blank=True, default='', max_length=100)),
                ('content', models.TextField()),
                ('companyId', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='core.Company')),
                ('studentId', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='core.Student')),
            ],
            options={
                'ordering': ['created'],
            },
Hadlina Rahmadinni's avatar
Hadlina Rahmadinni committed
198
        ),
199
200
201
202
203
204
205
206
207
208
        migrations.AddField(
            model_name='application',
            name='student',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Student'),
        ),
        migrations.AddField(
            model_name='application',
            name='vacancy',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Vacancy'),
        ),
209
210
        migrations.AlterUniqueTogether(
            name='recommendation',
Fannyah Dita Cahya's avatar
Fannyah Dita Cahya committed
211
            unique_together={('recommendation_giver', 'recommendation_receiver')},
212
        ),
213
214
        migrations.AlterUniqueTogether(
            name='application',
Fannyah Dita Cahya's avatar
Fannyah Dita Cahya committed
215
            unique_together={('student', 'vacancy')},
216
217
        ),
    ]