-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodels.py
More file actions
29 lines (22 loc) · 835 Bytes
/
Copy pathmodels.py
File metadata and controls
29 lines (22 loc) · 835 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
from datetime import datetime
from pydantic import BaseModel, Field, HttpUrl, NonNegativeFloat, NonNegativeInt
class InteractionStats(BaseModel):
views: NonNegativeInt
applications: NonNegativeInt
class VacancyItem(InteractionStats):
source: str = Field(min_length=1)
category: str = Field(min_length=1)
company_name: str | None = Field(min_length=1)
# addressCountry | addressLocality | addressRegion | postalCode.
address: str | None = Field(min_length=1)
title: str = Field(min_length=1)
description: str
years_of_experience: NonNegativeFloat
publication_date: datetime
url: HttpUrl
class Statistics(BaseModel):
category: str = Field(min_length=1)
from_datetime: datetime
to_datetime: datetime
technology_frequency: dict[str, int]
upsert_datetime: datetime