Skip to content

Instantly share code, notes, and snippets.

@jessehudl
Created June 23, 2015 13:13
Show Gist options
  • Save jessehudl/10efa24663b38b29a406 to your computer and use it in GitHub Desktop.
Save jessehudl/10efa24663b38b29a406 to your computer and use it in GitHub Desktop.
from django.db import models
class Interviewer(models.Model):
name = models.CharField(max_length=100)
disabled = models.BooleanField()
site_admin = models.BooleanField()
class Email(models.Model):
interviewer = models.ForeignKey('Interviewer')
email = models.CharField(max_length=100)
class ScoreCard(models.Model):
interviewer = models.ForeignKey('Interviewer')
interviewed_at = models.DateTimeField()
submitted_at = models.DateTimeField()
# Overall interview rating
OVERALL_RATING_CHOICES =(
('Definitely Not', 'Definitely Not'),
('No', 'No'),
('No Decision', 'No Decision'),
('Yes', 'Yes'),
('Strong Yes', 'Strong Yes')
)
overall_recommendation = models.CharField(max_length=14, choices=OVERALL_RATING_CHOICES)
class MetricRating(models.Model):
score_card = models.ForeignKey('ScoreCard')
# Ratings on individual fields
METRIC_RATING_CHOICES = (
('Definitely Not', 'Definitely Not'),
('No', 'No'),
('Mixed', 'Mixed'),
('Yes', 'Yes'),
('Strong Yes', 'Strong Yes')
)
metric_name = models.CharField(max_length=100)
rating = models.CharField(max_length=14, choices=METRIC_RATING_CHOICES)
class Job(models.Model):
name = models.CharField(max_length=150)
departments = models.CharField(max_length=150)
employment_type = models.CharField(max_length=150)
status = models.CharField(max_length=150)
opened_at = models.DateTimeField()
class Candidate(models.Model):
score_card = models.ForeignKey('ScoreCard')
job = models.ForeignKey('Job')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment