| | | 1 | | using System.Text.Json.Serialization; |
| | | 2 | | |
| | | 3 | | namespace ShopGuard.Core.Models; |
| | | 4 | | |
| | | 5 | | /// <summary> |
| | | 6 | | /// Booking payload as defined by the restful-booker API contract. |
| | | 7 | | /// Property names are mapped explicitly because the API uses all-lowercase JSON keys. |
| | | 8 | | /// </summary> |
| | | 9 | | public sealed class Booking |
| | | 10 | | { |
| | | 11 | | [JsonPropertyName("firstname")] |
| | 15 | 12 | | public required string FirstName { get; init; } |
| | | 13 | | |
| | | 14 | | [JsonPropertyName("lastname")] |
| | 13 | 15 | | public required string LastName { get; init; } |
| | | 16 | | |
| | | 17 | | [JsonPropertyName("totalprice")] |
| | 15 | 18 | | public required int TotalPrice { get; init; } |
| | | 19 | | |
| | | 20 | | [JsonPropertyName("depositpaid")] |
| | 13 | 21 | | public required bool DepositPaid { get; init; } |
| | | 22 | | |
| | | 23 | | [JsonPropertyName("bookingdates")] |
| | 17 | 24 | | public required BookingDates BookingDates { get; init; } |
| | | 25 | | |
| | | 26 | | [JsonPropertyName("additionalneeds")] |
| | 11 | 27 | | public string? AdditionalNeeds { get; init; } |
| | | 28 | | } |