Skip to content

Commit

Permalink
feat(jobs): add employer ID to the job offers (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuruyia authored Feb 16, 2024
1 parent 0c0ad64 commit c7dc708
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ data class JobOffer(
val job: Job,
val company: Company,
val salary: Int,
val status: Int
val status: Int,
val employerId: String
)
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ class JobOfferService(
source.company.name
),
source.salary,
source.statusValue
source.statusValue,
source.employerId
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@ class JobOfferWithJobAndCompanyToProto : Converter<JobOfferWithJobAndCompanyAndA
.setTitle(source.jobTitle)
.setCategory(source.jobCategoryTitle)
)
.setEmployerId(source.employerId)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ data class JobOfferWithJobAndCompanyAndApplicationStatus(
val jobId: String,
@Column("companyid")
val companyId: String,
@Column("employerid")
val employerId: String,
@Column("joboffertitle")
val title: String,
@Column("jobofferdescription")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ interface JobOfferRepository : ReactiveCrudRepository<JobOffer, UUID> {
jo.startdate as jobOfferStartDate,
jo.enddate as jobOfferEndDate,
jo.company as companyId,
jo.employerid as employerId,
c.name as companyName,
jo.salary as jobOfferSalary,
jc.title as jobCategoryTitle,
Expand All @@ -42,6 +43,7 @@ interface JobOfferRepository : ReactiveCrudRepository<JobOffer, UUID> {
jo.startdate as jobOfferStartDate,
jo.enddate as jobOfferEndDate,
jo.company as companyId,
jo.employerid as employerId,
c.name as companyName,
jo.salary as jobOfferSalary,
jc.title as jobCategoryTitle,
Expand All @@ -66,6 +68,7 @@ interface JobOfferRepository : ReactiveCrudRepository<JobOffer, UUID> {
jo.startdate as jobOfferStartDate,
jo.enddate as jobOfferEndDate,
jo.company as companyId,
jo.employerid as employerId,
c.name as companyName,
jo.salary as jobOfferSalary,
jc.title as jobCategoryTitle,
Expand All @@ -91,6 +94,7 @@ interface JobOfferRepository : ReactiveCrudRepository<JobOffer, UUID> {
jo.startdate as jobOfferStartDate,
jo.enddate as jobOfferEndDate,
jo.company as companyId,
jo.employerid as employerId,
c.name as companyName,
jo.salary as jobOfferSalary,
jc.title as jobCategoryTitle,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALTER TABLE joboffer
ADD COLUMN employerId UUID;
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
UPDATE joboffer
SET employerid = 'c80f53f4-0a33-4fe3-bf7f-a755c6e2235b'
WHERE id = 'f3a617dc-7798-40e6-ae63-739f88b6741d';

UPDATE joboffer
SET employerid = '0dc07c97-fc40-4ac2-a9f6-0b0bbbe6057e'
WHERE id = '92c7a573-0b53-4a9c-91dd-5e6af12c9ff6';

UPDATE joboffer
SET employerid = '8102b0f0-c03c-4f66-bd99-a2522625d11c'
WHERE id = 'de8aa118-cabf-4469-9b67-2f37240c51df';

UPDATE joboffer
SET employerid = '4d40844c-4db9-45d3-bffd-18804411a69c'
WHERE id = '34215d66-e1e0-43a7-861d-acddc2418fd5';
1 change: 1 addition & 0 deletions backend/protobuf/src/main/proto/models/jobOffer.proto
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ message JobOffer {
Job job = 8;
Company company = 9;
Status status = 10;
string employerId = 11;
}
4 changes: 4 additions & 0 deletions docs/openapi/api_gateway.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1234,6 +1234,10 @@ components:
type: integer
format: int8
example: -1
employerId:
type: string
format: uuid
example: 813ec247-9746-4049-b455-4ffe279f6221
MessageChannel:
type: object
properties:
Expand Down

0 comments on commit c7dc708

Please sign in to comment.