Job skill
For each Job posting we can have multiple skills that are Skill instance that are linked to Job with extra fields level importance to help us later with candidate matching
Model
Bases: SFLifecycleModel
Source code in backend/jobs/models.py
| class JobSkill(SFLifecycleModel):
salesforce_ref = models.CharField(max_length=255, blank=True)
job = models.ForeignKey(Job, on_delete=models.CASCADE, related_name="skills")
skill = models.ForeignKey(Skill, on_delete=models.CASCADE)
importance = models.PositiveIntegerField(
null=True,
help_text="The higher the value, the more important the skill is",
validators=[MaxValueValidator(100)],
)
level = models.PositiveIntegerField(
null=True,
help_text="The higher the value, the more proficient the skill is",
validators=[MaxValueValidator(100)],
)
class Meta:
ordering = ["pk"]
verbose_name = "Job Skill"
verbose_name_plural = "Job Skills"
db_table = "job_skills"
indexes = [
models.Index(fields=["job"]),
models.Index(fields=["skill"]),
models.Index(fields=["salesforce_ref"]),
]
def __str__(self):
return f"{self.skill} (Job: {self.job})"
|