Add migration 27 and read a remote role's area in the chips, the gates and the rows
roles.remote_model, roles.remote_where_model and role_remote, with a stored remote no host word gives kept as the host's word. The remote tokens filter over role_remote, remote_from and a require gate on country read a remote role through its area, extract waits while remote_where_model is NULL and writes the model's remote outright, and rows carry remote_where. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
189cf81350
commit
57cac5f896
8 files changed
+262
-62
No files matched your search
+15
-5
@@ -970,6 +970,10 @@ class Role(Model):
|
||||
#: Every place of the role, in the host's order. Not a column: filled by
|
||||
#: `Store.role` from `role_places`.
|
||||
places: list[RolePlace] = []
|
||||
#: Where a remote hire may live, as a label: "anywhere", "Europe",
|
||||
#: "United States, Canada". '' when the role is not remote or its area is
|
||||
#: not stated. Not a column: filled by `Store` from `role_remote`.
|
||||
remote_where: str = ""
|
||||
|
||||
@computed_field # type: ignore[prop-decorator]
|
||||
@property
|
||||
@@ -1076,6 +1080,9 @@ class RoleRow(Model):
|
||||
excerpt: str = ""
|
||||
#: How many open roles are copies of this one (`Role.copies`), 0 when none.
|
||||
copies: int = 0
|
||||
#: As `Role.remote_where`: the area a remote hire may live in, '' when
|
||||
#: the role is not remote or does not say.
|
||||
remote_where: str = ""
|
||||
|
||||
@computed_field # type: ignore[prop-decorator]
|
||||
@property
|
||||
@@ -1167,11 +1174,14 @@ class Application(Model):
|
||||
|
||||
#: The role columns a gate can name. `company` matches on the company key;
|
||||
#: `place` takes the Place filter's tokens (`app.places`: `country:DK`,
|
||||
#: `region:skane`, `place:malmo`, bare text a `place:`) on whole words; the rest are
|
||||
#: case-insensitive equality, except `salary_min` (at least the value) and
|
||||
#: `languages` (every language the role requires is one of the values).
|
||||
GateField = Literal["place", "country", "remote", "seniority", "function", "salary_min",
|
||||
"currency", "permit", "languages", "company"]
|
||||
#: `region:skane`, `place:malmo`, bare text a `place:`) on whole words;
|
||||
#: `remote_from` takes place tokens (`country:DK`, `country:EU`, `anywhere`)
|
||||
#: and is met by a remote role whose area overlaps one, as a `remote:` chip
|
||||
#: is; the rest are case-insensitive equality, except `salary_min` (at least
|
||||
#: the value) and `languages` (every language the role requires is one of
|
||||
#: the values).
|
||||
GateField = Literal["place", "country", "remote", "remote_from", "seniority", "function",
|
||||
"salary_min", "currency", "permit", "languages", "company"]
|
||||
GATE_FIELDS: tuple[str, ...] = get_args(GateField)
|
||||
|
||||
GateMode = Literal["require", "any", "prefer"]
|
||||
|
||||
Reference in new issue
Block a user