Open estatedocflow opened 6 months ago
public class RunnerAvailabilityDto
{
public string RunnerId { get; set; }
public DateTime StartDate { get; set; }
public DateTime EndDate { get; set; }
public List
RunnerId is foreign key ? If there is foreign key then which table to related ?
Description
Develop an API endpoint to allow runners (service providers) to set their availability for real estate service bookings. This API will enable runners to update their schedules, making their availability visible to customers through the booking platform.
Requirements
Develop a POST endpoint /api/availability for runners to set their availability. Input parameters:
Endpoint Details
Endpoint: POST /api/availability
Response: HTTP Status: 201 Created upon successful availability update. 400 Bad Request for invalid requests.
Endpoint: GET /api/availability to retrieve runner availability for the shared calendar.
request
response
Include filtering options (e.g., date range, service type) to fetch relevant availability data.
Dtos
Additional Notes
The implementation should ensure secure handling of runner IDs and availability data, with proper validation and error handling to maintain data integrity. The API should be designed to accommodate various availability settings (e.g., recurring schedules) and scale to handle multiple runners efficiently.
Tasks
Develop the /api/availability endpoint with validation and persistence logic. Test the API thoroughly to validate functionality and error handling.