44
55from files .models import UserFile
66from projects .models import Project
7+ from vacancy .constants import WorkExperience , WorkSchedule , WorkFormat
78from vacancy .managers import VacancyManager , VacancyResponseManager
89from django_stubs_ext .db .models import TypedModelMeta
910
@@ -16,6 +17,9 @@ class Vacancy(models.Model):
1617 role: A CharField title of the vacancy.
1718 required_skills: A GenericRelation of required skills for the vacancy.
1819 description: A TextField description of the vacancy.
20+ required_experience: CharField (choice).
21+ work_schedule: CharField (choice).
22+ work_format: CharField (choice).
1923 project: A ForeignKey referring to the Company model.
2024 is_active: A boolean indicating if Vacancy is active.
2125 datetime_created: A DateTimeField indicating date of creation.
@@ -28,24 +32,49 @@ class Vacancy(models.Model):
2832 related_query_name = "vacancies" ,
2933 )
3034 description = models .TextField (blank = True )
35+ required_experience = models .CharField (
36+ max_length = 50 ,
37+ choices = WorkExperience .choices (),
38+ blank = True ,
39+ null = True ,
40+ verbose_name = "Требуемый опыт" ,
41+ )
42+ work_schedule = models .CharField (
43+ max_length = 50 ,
44+ choices = WorkSchedule .choices (),
45+ blank = True ,
46+ null = True ,
47+ verbose_name = "График работы" ,
48+ )
49+ work_format = models .CharField (
50+ max_length = 50 ,
51+ choices = WorkFormat .choices (),
52+ blank = True ,
53+ null = True ,
54+ verbose_name = "Формат работы" ,
55+ )
3156 project = models .ForeignKey (
3257 Project ,
3358 on_delete = models .CASCADE ,
3459 null = False ,
3560 related_name = "vacancies" ,
3661 )
37-
38- is_active = models .BooleanField (blank = False , default = True )
39-
4062 datetime_created = models .DateTimeField (
41- verbose_name = "Дата создания" , null = False , auto_now_add = True
63+ null = False ,
64+ auto_now_add = True ,
65+ verbose_name = "Дата создания" ,
4266 )
4367 datetime_updated = models .DateTimeField (
44- verbose_name = "Дата обновления" , null = False , auto_now = True
68+ null = False ,
69+ auto_now = True ,
70+ verbose_name = "Дата обновления" ,
4571 )
4672 datetime_closed = models .DateTimeField (
47- verbose_name = "Дата закрытия" , null = True , blank = True
73+ null = True ,
74+ blank = True ,
75+ verbose_name = "Дата закрытия" ,
4876 )
77+ is_active = models .BooleanField (blank = False , default = True )
4978
5079 objects = VacancyManager ()
5180
0 commit comments