Skip to content

Commit 666ce1d

Browse files
committed
add new user and job fields for integrations
1 parent 476e2eb commit 666ce1d

File tree

4 files changed

+38
-2
lines changed

4 files changed

+38
-2
lines changed

lib/algora/accounts/schemas/user.ex

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,11 @@ defmodule Algora.Accounts.User do
187187
field :amount_raised, Money
188188
field :company_valuation, Money
189189

190+
# Ashby integration fields
191+
field :ashby_api_key, :string
192+
field :ashby_source_id, :string
193+
field :ashby_user_id, :string
194+
190195
has_many :identities, Identity
191196
has_many :memberships, Member, foreign_key: :user_id
192197
has_many :members, Member, foreign_key: :org_id
@@ -398,7 +403,10 @@ defmodule Algora.Accounts.User do
398403
:seeking_jobs,
399404
:hourly_rate_min,
400405
:hours_per_week,
401-
:preferences
406+
:preferences,
407+
:ashby_api_key,
408+
:ashby_source_id,
409+
:ashby_user_id
402410
])
403411
|> validate_required([:handle])
404412
|> validate_handle()
@@ -563,7 +571,10 @@ defmodule Algora.Accounts.User do
563571
:jurisdiction,
564572
:entity_type,
565573
:hiring_keywords,
566-
:poaching_targets
574+
:poaching_targets,
575+
:ashby_api_key,
576+
:ashby_source_id,
577+
:ashby_user_id
567578
])
568579
end
569580

lib/algora/jobs/schemas/job_posting.ex

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ defmodule Algora.Jobs.JobPosting do
3030
field :primary_tag, :string
3131
field :full_description, :string
3232
field :team, :string
33+
field :provider, :string
34+
field :provider_id, :string
3335

3436
field :location_meta, :map
3537
field :location_iso_lvl4, :string
@@ -77,6 +79,8 @@ defmodule Algora.Jobs.JobPosting do
7779
:primary_tag,
7880
:full_description,
7981
:team,
82+
:provider,
83+
:provider_id,
8084
:location_types,
8185
:locations,
8286
:min_compensation,
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
defmodule Algora.Repo.Migrations.AddProviderToJobPostings do
2+
use Ecto.Migration
3+
4+
def change do
5+
alter table(:job_postings) do
6+
add :provider, :string
7+
add :provider_id, :string
8+
end
9+
end
10+
end
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
defmodule Algora.Repo.Migrations.AddAshbyFieldsToUsers do
2+
use Ecto.Migration
3+
4+
def change do
5+
alter table(:users) do
6+
add :ashby_api_key, :string
7+
add :ashby_source_id, :string
8+
add :ashby_user_id, :string
9+
end
10+
end
11+
end

0 commit comments

Comments
 (0)