from __future__ import unicode_literals
from django.db import models

class User(models.Model):
    first_name = models.CharField(max_length=255)
    last_name =  models.CharField(max_length=255)
    email = models.CharField(max_length=255)
    password = models.CharField(max_length=255)
    created_at = models.DateTimeField(auto_now_add = True)

class Job(models.Model):
    title = models.CharField(max_length=255)
    desc = models.TextField()
    location = models.CharField(max_length=255)
    user = models.ForeignKey(User, related_name="uploaded_jobs")
    created_at = models.DateTimeField(auto_now_add = True)
    liked_users = models.ManyToManyField(User, related_name="liked_jobs")
    
