GeeksCAT / nem-per-feina

Job portal application using Django
https://nemperfeina.cat
MIT License
20 stars 19 forks source link

Improve employee profile #18

Open fullonic opened 4 years ago

fullonic commented 4 years ago

Right now there is only the name and gender information. It would be nice to have fields like:

oriolpiera commented 4 years ago

@fullonic I guess new fields types:

@francescarpi Do you think that all fields can be in the same PR? Or we should split the Attachment field

xdiume commented 4 years ago

What about to create a new model to manage social/work profiles? I think a new model is better choice to handle design changes. Its more suitable.

fullonic commented 4 years ago

Hi @oriolpiera, I was thinking in that fields and some extras. After taking some ideas from other job portals I came out in this examples models.


class EmployeeProfile(models.Model):
    employee_id = models.ForeignKey(User, on_delete=models.CASCADE)
    employee_uuid = models.UUIDField(default=uuid.uuid4, editable=False, unique=True)
    first_name = models.CharField(max_length=32, blank=True, null=True, default="")
    last_name = models.CharField(max_length=32, blank=True, null=True, default="")
    # email should be populated automatically on user registration
    email = models.EmailField(unique=True, blank=False)
    avatar = models.ImageField(upload_to="img/avatares/",null=True, blank=True)
    location = models.CharField(max_length=32, blank=True, null=True, default="")
    contact_phone = models.CharField(max_length=32, blank=True, null=True, default="")
    # Example: Backend Developer 
    professional_title = models.CharField(
        max_length=64, blank=True, null=True, default=""
    )
    current_job = models.CharField(max_length=64, blank=True, null=True, default="")
    short_bio = models.TextField(max_length=512, blank=True, null=True)
    cv_file = models.FileField(upload_to="cvs/", null=True, blank=True)
    open_to_relocation = models.BooleanField(blank=True, null=True)
    prefer_remote = models.BooleanField(blank=True, null=True)
    # PostgreSQL array field
    additional_skills = pg_field.ArrayField(
        base_field=models.CharField(max_length=64), size=10, null=True, blank=True
    )
    # Online social network
    linked_in = models.URLField(unique=True, blank=True, null=True)
    twitter = models.URLField(unique=True, blank=True, null=True)
    git_profile = models.URLField(unique=True, blank=True, null=True)
    web_page = models.URLField(unique=True, blank=True, null=True)

class EmploymentHistory(models.Model):
    employee_id = models.ForeignKey(User, on_delete=models.CASCADE)
    uuid = models.UUIDField(default=uuid.uuid4, editable=False, unique=True)
    position = models.CharField(max_length=64, blank=True, null=True, default="")
    company = models.CharField(max_length=64, blank=True, null=True, default="")
    location = models.CharField(max_length=32, blank=True, null=True, default="")
    start_at = models.DateField(blank=True, null=True)
    end_at = models.DateField(blank=True, null=True)
    description = models.TextField(blank=True, null=True, max_length=512)

class EmployeeEducation(models.Model):
    employee_id = models.ForeignKey(User, on_delete=models.CASCADE)
    uuid = models.UUIDField(default=uuid.uuid4, editable=False, unique=True)
    school = models.CharField(max_length=64, blank=True, null=True, default="")
    degree = models.CharField(max_length=64, blank=True, null=True, default="")
    start_at = models.IntegerField(blank=True, null=True, default="")
    end_at = models.IntegerField(blank=True, null=True, default="")
    description = models.TextField(blank=True, null=True, max_length=512)

I'm not sure if best practices, but I was thinking in having the current User model only to handle authentication and registration related stuff and a model EmployeeProfile to hold all the personal information. What do you think? All fields are optional, except the email, and the EmployeeProfile would be created automatically once the user sign up as employee.

This is just a proposal. Maybe to much fields? I saw that in some portals the provide a extra field to add certifications. Should we have as well?

oriolpiera commented 4 years ago

@fullonic @xdiume great aproach. I unassing from this issue because in the next few days, I can't do it.

fullonic commented 4 years ago

@oriolpiera We don't have anything defined. I will let you know when we are done with the planning and if you can, we work together on this issue. @xdiume Would you like to work together on this issue?

xdiume commented 4 years ago

Yes @fullonic . There is another Issue #67 related with user/profile.