Open estatedocflow opened 1 month ago
@Riya2993 sign here working hours, please!
You missed also the PR to merge it in the dev branch, please added it.
@Riya2993 I saw your changes, please don't change the SDK version, use .NET 8.
I have added the entity for House and HousePhoto
public class House
{
[Key]
public Guid Id { get; set; }
public string Address { get; set; }
public string City { get; set; }
public string OwnerFirstName { get; set; }
public string OwnerLastName { get; set; }
public string Description { get; set; }
public HouseState State { get; set; }
public virtual IEnumerable
public class HousePhoto
{
[Key]
public Guid Id { get; set; }
[Required]
[ForeignKey("House")]
public Guid HouseId { get; set; }
public string PhotoUrl { get; set; }
public virtual House House { get; set; }
}
Also, I cannot see the AttachmentDto, just can see its use in the HouseDto model.
Merged Main into Dev with latest changes
@Riya2993 you're right, you can delete the HousePhoto model and create a generic HouseAttachment, with an additional field called DocumentType (it will be an enum, and at the moment we only have Photo - 0, Document - 1)
DocumentType save as 0 and 1 in HouseAttachment table ?
public class House
{
[Key]
public Guid Id { get; set; }
public string Address { get; set; }
public string City { get; set; }
public string OwnerFirstName { get; set; }
public string OwnerLastName { get; set; }
public string Description { get; set; }
public HouseState State { get; set; }
public virtual IEnumerable
public class HouseAttachment
{
[Key]
public Guid Id { get; set; }
[Required]
[ForeignKey("House")]
public Guid HouseId { get; set; }
public string PhotoUrl { get; set; }
public DocumentType DocumentType { get; set; }
public virtual Models.Entities.House.House House { get; set; }
}
It is correct entity now ?
yes is correct, ok 0 and 1 is enought
How we need to generate Image and Document Url? Also from request in which type of format Url get?
PatchHouseDto is not defined and which specific fields is required to update.
@Riya2993 Patch House Photo Patch House Document How we need to generate Image and Document Url? Also from request in which type of format Url get?
we'll store the document and image in an AWS S3 bucket, so it will be a GUID. WDYT?
Partial Update of House (PATCH) Endpoint: PATCH /api/houses/{id} Description: Partially update specific fields of a house identified by its ID. Parameters: {id}: Unique identifier of the house to update. Request Body: JSON object containing fields to update (PatchHouseDto). Response: HouseDto object representing the updated house. PatchHouseDto is not defined and which specific fields is required to update.
You're right... it is a refuse... ignore it. Thanks
To store documents in Amazon s3 bucket, we need AWS credentials(like accessKey and secreyKey) and the name of the bucket. So, after storing Image in document we'll get ImageUrl(string).
@Riya2993 yeas of course, but we'll do this in another issue, at the moment you only build the structure to do that. ok?
Total hours for implementation: 4
Additional hours spent for resolving - 2
Description:
This API will provide essential functionalities for managing house data, including property details, attachments, photos, and transaction status.
API Endpoints Definition:
1. Get Houses Endpoint: GET /api/houses Description: Retrieve a list of all houses. Response: Array of HouseDto objects representing each house.
2. Get House by ID Endpoint: GET /api/houses/{id} Description: Retrieve details of a specific house by its ID. Parameters: {id}: Unique identifier of the house. Response: HouseDto object representing the house with the specified ID.
3. Create House Endpoint: POST /api/houses Description: Create a new house entry. Request Body: CreateHouseDto object containing house details. Response: HouseDto object representing the newly created house.
4. Update House Endpoint: PUT /api/houses/{id} Description: Update all fields of a house identified by its ID. Parameters: {id}: Unique identifier of the house to update. Request Body: UpdateHouseDto object containing updated house details. Response: HouseDto object representing the updated house.
5. Partial Update of House (PATCH) Endpoint: PATCH /api/houses/{id} Description: Partially update specific fields of a house identified by its ID. Parameters: {id}: Unique identifier of the house to update. Request Body: JSON object containing fields to update (PatchHouseDto). Response: HouseDto object representing the updated house.
6. Delete House Endpoint: DELETE /api/houses/{id} Description: Delete a house by its ID. Parameters: {id}: Unique identifier of the house to delete. Response: HTTP status indicating success or failure of the deletion operation.
7. Patch House Photo Endpoint: PATCH /api/houses/{id}/photo Description: Update or add photos for a specific house. Parameters: {id}: Unique identifier of the house to update. Request Body: Array of photo URLs (PatchPhotoDto). Response: HouseDto object representing the updated house with the new photos.
8. Patch House Document Endpoint: PATCH /api/houses/{id}/document Description: Update or add documents for a specific house. Parameters: {id}: Unique identifier of the house to update. Request Body: Array of document details (PatchDocumentDto). Response: HouseDto object representing the updated house with the new documents.
9. Patch House State Endpoint: PATCH /api/houses/{id}/state Description: Update the state of a house identified by its ID. Parameters: {id}: Unique identifier of the house to update. Request Body: JSON object containing the new state (PatchHouseStateDto). Response: HouseDto object representing the updated house.
Data Transfer Objects (DTOs):