- Updated `Walk` class to include `PaymentType` property. - Introduced `WalkPaymentTypeDto` enum for payment types. - Modified DTOs (`PublicWalkRequestAcceptDto`, `WalkCreateDto`, `WalkDto`, `WalkWithNamesDto`) to include `PaymentType`. - Enhanced `ApiWalksController` with new endpoints for accepting and canceling walks, and confirming walks with ratings. - Updated `MappingProfile` for seamless conversion between `WalkPaymentType` and `WalkPaymentTypeDto`.
194 lines
5.2 KiB
C#
194 lines
5.2 KiB
C#
using System;
|
||
using System.Collections.Generic;
|
||
using System.ComponentModel.DataAnnotations;
|
||
using System.Text;
|
||
using System.Threading.Tasks;
|
||
using gehGassi.Dto.Common;
|
||
|
||
namespace gehGassi.Dto.Walks
|
||
{
|
||
/// <summary>
|
||
/// DTO für einen Walk
|
||
/// </summary>
|
||
public class WalkDto : SyncEntityDto
|
||
{
|
||
/// <summary>
|
||
/// Art der Walk Anfrage
|
||
/// </summary>
|
||
[Required]
|
||
public WalkTypeDto Type { get; set; }
|
||
|
||
/// <summary>
|
||
/// Welche Art von Service soll durchgeführt werden
|
||
/// </summary>
|
||
[Required]
|
||
public WalkServiceTypeDto ServiceType { get; set; }
|
||
|
||
/// <summary>
|
||
/// Id des Walkers
|
||
/// </summary>
|
||
[Required]
|
||
[MaxLength(128)]
|
||
public string DogWalkerId { get; set; }
|
||
|
||
/// <summary>
|
||
/// Id des Hundebesitzers
|
||
/// </summary>
|
||
[Required]
|
||
[MaxLength(128)]
|
||
public string DogOwnerId { get; set; }
|
||
|
||
/// <summary>
|
||
/// Id der öffentlichen Anfrage, wenn über diese erstellt
|
||
/// </summary>
|
||
[MaxLength(128)]
|
||
public string PublicWalkRequestId { get; set; }
|
||
|
||
/// <summary>
|
||
/// Jsonliste mit Id´s der Hunde die ausgewählt wurden
|
||
/// </summary>
|
||
public string DogsJson { get; set; }
|
||
|
||
/// <summary>
|
||
/// Anzahl der Hunde
|
||
/// </summary>
|
||
[Required]
|
||
public int DogCount { get; set; }
|
||
|
||
/// <summary>
|
||
/// Startdatum des Walks mit Urhrzeit
|
||
/// </summary>
|
||
[Required]
|
||
public DateTimeOffset Start { get; set; }
|
||
|
||
/// <summary>
|
||
/// Enddatum des Walks mit Uhrzeit
|
||
/// </summary>
|
||
[Required]
|
||
public DateTimeOffset End { get; set; }
|
||
|
||
/// <summary>
|
||
/// Wo soll der Hunde abgeholt werden
|
||
/// </summary>
|
||
public AddressDto PickupAddress { get; set; }
|
||
|
||
/// <summary>
|
||
/// Breitengrad der Abhol-Adresse
|
||
/// </summary>
|
||
public double PickupAddressLat { get; set; }
|
||
|
||
/// <summary>
|
||
/// Längengrad der Abhol-Adresse
|
||
/// </summary>
|
||
public double PickupAddressLng { get; set; }
|
||
|
||
/// <summary>
|
||
/// Wo soll der Hunde zurückgegeben werden werden
|
||
/// </summary>
|
||
public AddressDto ReturnAddress { get; set; }
|
||
|
||
/// <summary>
|
||
/// Breitengrad der Rückgabe-Adresse
|
||
/// </summary>
|
||
public double ReturnAddressLat { get; set; }
|
||
|
||
/// <summary>
|
||
/// Längengrad der Rückgabe-Adresse
|
||
/// </summary>
|
||
public double ReturnAddressLng { get; set; }
|
||
|
||
/// <summary>
|
||
/// Preis für den Walk / Das Sitting. Wird gesetzt und kann entweder fix sein (öffentliche Anfrage) oder errechnet
|
||
/// </summary>
|
||
public decimal Price { get; set; }
|
||
|
||
/// <summary>
|
||
/// Zusatzinfo für den Walk. Z.B. bei Susi klingeln
|
||
/// </summary>
|
||
[MaxLength(500)]
|
||
public string Info { get; set; }
|
||
|
||
/// <summary>
|
||
/// Status eines Walks
|
||
/// </summary>
|
||
[Required]
|
||
public WalkStatusDto Status { get; set; }
|
||
|
||
/// <summary>
|
||
/// Wann wurde der Walk / Sitting gestartet?
|
||
/// </summary>
|
||
public DateTimeOffset? Started { get; set; }
|
||
|
||
/// <summary>
|
||
/// Wann wurde der Walk / Sitting beendet?
|
||
/// </summary>
|
||
public DateTimeOffset? Completed { get; set; }
|
||
|
||
/// <summary>
|
||
/// Wann wurde der Walk / Sitting bestätigt?
|
||
/// </summary>
|
||
public DateTimeOffset? Confirmed { get; set; }
|
||
|
||
/// <summary>
|
||
/// Wann wurde der Walk / Sitting reklamiert?
|
||
/// </summary>
|
||
public DateTimeOffset? Complained { get; set; }
|
||
|
||
/// <summary>
|
||
/// Optional: Grund für die Reklamation
|
||
/// </summary>
|
||
public string ComplainReason { get; set; }
|
||
|
||
#region Status Infos
|
||
|
||
/// <summary>
|
||
/// Optional: Grund für die Ablehnung
|
||
/// </summary>
|
||
[MaxLength(500)]
|
||
public string DeclinedReason { get; set; }
|
||
|
||
/// <summary>
|
||
/// Optional: Grund für die Stornierung
|
||
/// </summary>
|
||
[MaxLength(500)]
|
||
public string CancelledReason { get; set; }
|
||
|
||
/// <summary>
|
||
/// Wer hat eine Stornierung durchgeführt
|
||
/// </summary>
|
||
[Required]
|
||
public CancellationSourceDto CancelledBy { get; set; }
|
||
|
||
/// <summary>
|
||
/// Anmerkungen vom Walker nach dem Abschluss
|
||
/// </summary>
|
||
[MaxLength(500)]
|
||
public string CompletedInfo { get; set; }
|
||
|
||
/// <summary>
|
||
/// Kotabsatz?
|
||
/// </summary>
|
||
[Required]
|
||
public bool Defactation { get; set; }
|
||
|
||
#endregion
|
||
|
||
/// <summary>
|
||
/// Zahlungsstatus des Walks
|
||
/// </summary>
|
||
[Required]
|
||
public PaymentStatusDto PaymentStatus { get; set; }
|
||
|
||
/// <summary>
|
||
/// Zahlungsart für den Walk
|
||
/// </summary>
|
||
public WalkPaymentTypeDto PaymentType { get; set; }
|
||
|
||
/// <summary>
|
||
/// Datum der Erstellung des Walks
|
||
/// </summary>
|
||
[Required]
|
||
public DateTimeOffset Created { get; set; }
|
||
}
|
||
}
|