89 lines
6.4 KiB
Python
89 lines
6.4 KiB
Python
# Generated by Django 4.2.7 on 2025-10-07 14:45
|
|
|
|
import django.core.validators
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='JobPosition',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('title', models.CharField(help_text='Job title', max_length=255)),
|
|
('slug', models.SlugField(blank=True, max_length=255, unique=True)),
|
|
('department', models.CharField(blank=True, help_text='Department or category', max_length=100)),
|
|
('employment_type', models.CharField(choices=[('full-time', 'Full Time'), ('part-time', 'Part Time'), ('contract', 'Contract'), ('internship', 'Internship'), ('remote', 'Remote')], default='full-time', max_length=20)),
|
|
('location_type', models.CharField(choices=[('remote', 'Remote'), ('on-site', 'On-site'), ('hybrid', 'Hybrid')], default='remote', max_length=20)),
|
|
('location', models.CharField(default='Remote', help_text='Work location', max_length=255)),
|
|
('open_positions', models.PositiveIntegerField(default=1, help_text='Number of open positions')),
|
|
('experience_required', models.CharField(blank=True, help_text='e.g., 3+ years', max_length=100)),
|
|
('salary_min', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True)),
|
|
('salary_max', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True)),
|
|
('salary_currency', models.CharField(default='USD', max_length=10)),
|
|
('salary_period', models.CharField(default='per month', help_text='e.g., per month, per year', max_length=20)),
|
|
('salary_additional', models.TextField(blank=True, help_text='Additional salary info like bonuses, benefits')),
|
|
('short_description', models.TextField(blank=True, help_text='Brief description for listing page')),
|
|
('about_role', models.TextField(blank=True, help_text='About this role / Who we are')),
|
|
('requirements', models.JSONField(blank=True, default=list, help_text='List of requirements')),
|
|
('responsibilities', models.JSONField(blank=True, default=list, help_text='List of responsibilities')),
|
|
('qualifications', models.JSONField(blank=True, default=list, help_text='List of qualifications')),
|
|
('bonus_points', models.JSONField(blank=True, default=list, help_text='Nice to have skills')),
|
|
('benefits', models.JSONField(blank=True, default=list, help_text='What you get')),
|
|
('start_date', models.CharField(default='ASAP', help_text='Expected start date', max_length=100)),
|
|
('posted_date', models.DateTimeField(auto_now_add=True)),
|
|
('updated_date', models.DateTimeField(auto_now=True)),
|
|
('deadline', models.DateTimeField(blank=True, help_text='Application deadline', null=True)),
|
|
('status', models.CharField(choices=[('active', 'Active'), ('closed', 'Closed'), ('draft', 'Draft')], default='active', max_length=20)),
|
|
('featured', models.BooleanField(default=False, help_text='Feature this job on homepage')),
|
|
('priority', models.IntegerField(default=0, help_text='Higher number = higher priority in listing')),
|
|
],
|
|
options={
|
|
'verbose_name': 'Job Position',
|
|
'verbose_name_plural': 'Job Positions',
|
|
'ordering': ['-priority', '-posted_date'],
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name='JobApplication',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('first_name', models.CharField(max_length=100)),
|
|
('last_name', models.CharField(max_length=100)),
|
|
('email', models.EmailField(max_length=254)),
|
|
('phone', models.CharField(blank=True, max_length=20)),
|
|
('current_position', models.CharField(blank=True, help_text='Current job title', max_length=255)),
|
|
('current_company', models.CharField(blank=True, max_length=255)),
|
|
('years_of_experience', models.CharField(blank=True, max_length=50)),
|
|
('cover_letter', models.TextField(blank=True, help_text='Cover letter or message')),
|
|
('resume', models.FileField(help_text='Upload your resume (PDF, DOC, DOCX)', upload_to='career/resumes/%Y/%m/', validators=[django.core.validators.FileExtensionValidator(allowed_extensions=['pdf', 'doc', 'docx'])])),
|
|
('portfolio_url', models.URLField(blank=True, help_text='Link to portfolio or LinkedIn')),
|
|
('linkedin_url', models.URLField(blank=True)),
|
|
('github_url', models.URLField(blank=True)),
|
|
('website_url', models.URLField(blank=True)),
|
|
('available_from', models.DateField(blank=True, help_text='When can you start?', null=True)),
|
|
('notice_period', models.CharField(blank=True, help_text='Notice period if applicable', max_length=100)),
|
|
('expected_salary', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True)),
|
|
('salary_currency', models.CharField(default='USD', max_length=10)),
|
|
('status', models.CharField(choices=[('new', 'New'), ('reviewing', 'Reviewing'), ('shortlisted', 'Shortlisted'), ('interviewed', 'Interviewed'), ('accepted', 'Accepted'), ('rejected', 'Rejected')], default='new', max_length=20)),
|
|
('applied_date', models.DateTimeField(auto_now_add=True)),
|
|
('updated_date', models.DateTimeField(auto_now=True)),
|
|
('notes', models.TextField(blank=True, help_text='Internal notes (not visible to applicant)')),
|
|
('consent', models.BooleanField(default=False, help_text='Consent to data processing')),
|
|
('job', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='applications', to='career.jobposition')),
|
|
],
|
|
options={
|
|
'verbose_name': 'Job Application',
|
|
'verbose_name_plural': 'Job Applications',
|
|
'ordering': ['-applied_date'],
|
|
},
|
|
),
|
|
]
|