Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ namespace Booking.Application.Appointments.Common.Extensions
{
public static class MappingExtensions
{
public static List<AttachmentDto> ToAttachmentDtos(this IEnumerable<AppointmentAttachment> attachments)
public static List<AttachmentDto> ToAttachmentDtos(
this IEnumerable<AppointmentAttachment> attachments)
{
if (attachments == null)
return [];
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
namespace Booking.Application.Appointments.Dtos
{
public record AppointmentBaseDto
{
public Guid Id { get; init; }
public Guid DoctorId { get; init; }
public Guid PatientId { get; init; }

public string PatientName { get; set; } = string.Empty;
public string DoctorName { get; init; } = string.Empty;
public string Specialty { get; init; } = string.Empty;

public string? DoctorPhotoUrl { get; init; }
public string? DoctorPhoneNumber { get; init; }
public decimal Price { get; init; }

public string Status { get; init; } = string.Empty;
public string? MedicalNotes { get; init; } = string.Empty;
public DateTime StartTime { get; init; }
public DateTime EndTime { get; init; }
}
}
Original file line number Diff line number Diff line change
@@ -1,24 +1,9 @@

namespace Booking.Application.Appointments.Dtos
{
public record AppointmentDetailDto
public record AppointmentDetailDto : AppointmentBaseDto
{
public Guid Id { get; init; }
public Guid DoctorId { get; init; }
public Guid PatientId { get; init; }

public string PatientName { get; set; } = string.Empty;
public string DoctorName { get; init; } = string.Empty;
public string Specialty { get; init; } = string.Empty;

public string? DoctorPhotoUrl { get; init; }
public string? DoctorPhoneNumber { get; init; }
public decimal Price { get; init; }

public string Status { get; init; } = string.Empty;
public string? MedicalNotes { get; init; } = string.Empty;
public List<AttachmentDto> Attachments { get; init; } = [];
public DateTime StartTime { get; init; }
public DateTime EndTime { get; init; }

}
}
Original file line number Diff line number Diff line change
@@ -1,22 +1,4 @@
namespace Booking.Application.Appointments.Dtos
{
public class AppointmentListDto
{
public Guid Id { get; init; }
public Guid DoctorId { get; init; }
public Guid PatientId { get; init; }

public string PatientName { get; set; } = string.Empty;
public string DoctorName { get; init; } = string.Empty;
public string Specialty { get; init; } = string.Empty;

public string? DoctorPhotoUrl { get; init; }
public string? DoctorPhoneNumber { get; init; }
public decimal Price { get; init; }

public string Status { get; init; } = string.Empty;
public string? MedicalNotes { get; init; } = string.Empty;
public DateTime StartTime { get; init; }
public DateTime EndTime { get; init; }
}
public record AppointmentListDto : AppointmentBaseDto;
}
Loading