Issue Title: Implement Job Proposals Functionality
Issue Description:
As a freelancer, I want to submit proposals for job listings posted by clients so that I can express my interest and qualifications for available projects. This functionality should allow freelancers to submit proposals for jobs and enable clients to review those proposals.
Tasks:
-
Submit Proposal:
- Create an endpoint in the ProposalController for freelancers to submit proposals for specific jobs.
- Collect necessary details for the proposal, including:
job_id: The ID of the job being applied for.
freelancer_id: The ID of the freelancer (automatically derived from the authenticated user's context).
cover_letter: A cover letter detailing the freelancer's qualifications and interest in the job.
proposed_rate: The rate proposed by the freelancer for the job.
status: Default to "Pending".
-
Get Proposals for a Job:
- Create an endpoint to retrieve all proposals submitted for a specific job, accessible by the client who posted the job.
-
Get Proposal Status:
- Create an endpoint for freelancers to check the status of their proposals for specific jobs.
-
Update Proposal Status:
- Create an endpoint for clients to update the status of proposals (e.g., Accepted, Rejected).
Acceptance Criteria:
-
Submit Proposal:
-
Get Proposals for a Job:
-
Get Proposal Status:
-
Update Proposal Status:
Endpoint Specifications:
-
Submit Proposal:
- Method:
POST
- URL:
/proposals
- Request Body Example:
{
"job_id": 12345,
"cover_letter": "I am very interested in this job...",
"proposed_rate": 50.00
}
-
Get Proposals for a Job:
- Method:
GET
- URL:
/jobs/{jobId}/proposals
-
Get Proposal Status:
- Method:
GET
- URL:
/proposals/{proposalId}
-
Update Proposal Status:
- Method:
PUT
- URL:
/proposals/{proposalId}/status
- Request Body Example:
Issue Title: Implement Job Proposals Functionality
Issue Description:
As a freelancer, I want to submit proposals for job listings posted by clients so that I can express my interest and qualifications for available projects. This functionality should allow freelancers to submit proposals for jobs and enable clients to review those proposals.
Tasks:
Submit Proposal:
job_id: The ID of the job being applied for.freelancer_id: The ID of the freelancer (automatically derived from the authenticated user's context).cover_letter: A cover letter detailing the freelancer's qualifications and interest in the job.proposed_rate: The rate proposed by the freelancer for the job.status: Default to "Pending".Get Proposals for a Job:
Get Proposal Status:
Update Proposal Status:
Acceptance Criteria:
Submit Proposal:
POSTrequest to/proposalsto submit a proposal.Get Proposals for a Job:
GETrequest to/jobs/{jobId}/proposalsto retrieve proposals for their job.Get Proposal Status:
GETrequest to/proposals/{proposalId}to check their proposal status.Update Proposal Status:
PUTrequest to/proposals/{proposalId}/statusto update the proposal status.Endpoint Specifications:
Submit Proposal:
POST/proposals{ "job_id": 12345, "cover_letter": "I am very interested in this job...", "proposed_rate": 50.00 }Get Proposals for a Job:
GET/jobs/{jobId}/proposalsGet Proposal Status:
GET/proposals/{proposalId}Update Proposal Status:
PUT/proposals/{proposalId}/status{ "status": "Accepted" }