This commit is contained in:
parent
a099d4aa8d
commit
222af6ec43
@ -37,14 +37,14 @@ class JobListing(models.Model):
|
|||||||
created_at = models.DateTimeField(default=timezone.now)
|
created_at = models.DateTimeField(default=timezone.now)
|
||||||
status = models.CharField(max_length=1, choices=status_choices, default='W')
|
status = models.CharField(max_length=1, choices=status_choices, default='W')
|
||||||
status_paid = models.CharField(max_length=1, choices=paid_status, default='N')
|
status_paid = models.CharField(max_length=1, choices=paid_status, default='N')
|
||||||
# category = models.CharField(max_length=255, null=True, blank=True)
|
category = models.CharField(max_length=255, null=True, blank=True)
|
||||||
expiration_date = models.DateTimeField(null=True, blank=True)
|
expiration_date = models.DateTimeField(null=True, blank=True)
|
||||||
image = models.CharField(max_length=255, null=True, blank=True)
|
image = models.CharField(max_length=255, null=True, blank=True)
|
||||||
experience_level = models.CharField(max_length=255, null=True, blank=True)
|
experience_level = models.CharField(max_length=255, null=True, blank=True)
|
||||||
employment_type = models.CharField(max_length=255, null=True, blank=True)
|
employment_type = models.CharField(max_length=255, null=True, blank=True)
|
||||||
work_from_home = models.CharField(max_length=255)
|
work_from_home = models.CharField(max_length=255)
|
||||||
updated_at = models.DateTimeField(auto_now=True)
|
updated_at = models.DateTimeField(auto_now=True)
|
||||||
# skillLevels = models.ManyToManyField('SkillLevels', blank=True)
|
skill_levels = models.JSONField(null=True, blank=True, defualt=list)
|
||||||
anonymous_user_data = models.ForeignKey(AnonymousUserData,
|
anonymous_user_data = models.ForeignKey(AnonymousUserData,
|
||||||
null=True,
|
null=True,
|
||||||
blank=True,
|
blank=True,
|
||||||
@ -71,19 +71,6 @@ class Skill(models.Model):
|
|||||||
def __str__(self):
|
def __str__(self):
|
||||||
return f"{self.skill_name}"
|
return f"{self.skill_name}"
|
||||||
|
|
||||||
class SkillLevels(models.Model):
|
|
||||||
|
|
||||||
proficiency_choices = [
|
|
||||||
('N', 'Nice to have'),
|
|
||||||
('B', 'Podstawowy'),
|
|
||||||
('M', 'Średnio zaawansowany'),
|
|
||||||
('A', 'Zaawansowany'),
|
|
||||||
('E', 'Ekspert'),
|
|
||||||
]
|
|
||||||
|
|
||||||
skill_id = models.ForeignKey(Skill, on_delete=models.CASCADE)
|
|
||||||
skill_level = models.CharField(max_length=1, choices=proficiency_choices,)
|
|
||||||
jobposting_id = models.ForeignKey(JobListing, on_delete=models.CASCADE)
|
|
||||||
|
|
||||||
class CompanyLogo(models.Model):
|
class CompanyLogo(models.Model):
|
||||||
company_logo = models.ImageField(upload_to=rename_file)
|
company_logo = models.ImageField(upload_to=rename_file)
|
||||||
|
|||||||
@ -32,9 +32,11 @@ class JobListingSerializer(serializers.ModelSerializer):
|
|||||||
fields = [
|
fields = [
|
||||||
'id', 'posting_option',
|
'id', 'posting_option',
|
||||||
'company_name', 'name', 'content', 'minsalary', 'maxsalary',
|
'company_name', 'name', 'content', 'minsalary', 'maxsalary',
|
||||||
'localization', 'created_by', 'created_at', 'status', 'status_paid',
|
'localization', 'created_by', 'created_at', 'status',
|
||||||
'expiration_date', 'experience_level', 'employment_type', 'work_from_home',
|
'status_paid', 'expiration_date', 'experience_level',
|
||||||
'updated_at', 'contact_email', 'first_name', 'last_name', 'anonymous_user_data'
|
'employment_type', 'work_from_home', 'updated_at', 'skill_levels',
|
||||||
|
'contact_email', 'first_name', 'last_name', 'anonymous_user_data',
|
||||||
|
'category', 'webpage', 'image', 'requiresalary', 'vat_number'
|
||||||
]
|
]
|
||||||
|
|
||||||
class CompanyLogoSerializer(serializers.ModelSerializer):
|
class CompanyLogoSerializer(serializers.ModelSerializer):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user