125 lines
3.4 KiB
C#
125 lines
3.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using gehGassiApp.Domain.Base;
|
|
using gehGassiApp.Domain.Common;
|
|
|
|
namespace gehGassiApp.Domain.Lookup
|
|
{
|
|
/// <summary>
|
|
/// Lookup für DogWalker
|
|
/// </summary>
|
|
public class DogWalkerLookup : SyncEntityVw
|
|
{
|
|
/// <summary>
|
|
/// Art des App-Users
|
|
/// </summary>
|
|
public AppUserType Type { get; set; }
|
|
|
|
/// <summary>
|
|
/// Vorname
|
|
/// </summary>
|
|
public string FirstName { get; set; }
|
|
|
|
/// <summary>
|
|
/// Nachname
|
|
/// </summary>
|
|
public string LastName { get; set; }
|
|
|
|
/// <summary>
|
|
/// Optional - Foto des Benutzers
|
|
/// </summary>
|
|
public string Photo { get; set; }
|
|
|
|
/// <summary>
|
|
/// Verifiziert
|
|
/// </summary>
|
|
public bool Verified { get; set; }
|
|
|
|
/// <summary>
|
|
/// Breitengrad der Adresse
|
|
/// </summary>
|
|
public double Lat { get; set; }
|
|
|
|
/// <summary>
|
|
/// Längengrad der Adresse
|
|
/// </summary>
|
|
public double Lng { get; set; }
|
|
|
|
/// <summary>
|
|
/// Ort
|
|
/// </summary>
|
|
public string City { get; set; }
|
|
|
|
/// <summary>
|
|
/// Distanz zum Lookup
|
|
/// </summary>
|
|
public double Distance { get; set; }
|
|
|
|
/// <summary>
|
|
/// Durchschnittliche Bewertung
|
|
/// </summary>
|
|
public decimal AverageRating { get; set; }
|
|
|
|
/// <summary>
|
|
/// Anzahl Bewertungen
|
|
/// </summary>
|
|
public int TotalRatings { get; set; }
|
|
|
|
/// <summary>
|
|
/// Über mich
|
|
/// </summary>
|
|
public string About { get; set; }
|
|
|
|
/// <summary>
|
|
/// Preis für einen Walk je Stunde
|
|
/// </summary>
|
|
public decimal PriceWalk { get; set; }
|
|
|
|
/// <summary>
|
|
/// Preis für Tagesbetreuung je Stunde
|
|
/// </summary>
|
|
public decimal PriceDay { get; set; }
|
|
|
|
/// <summary>
|
|
/// Preis für Sitting je Tag
|
|
/// </summary>
|
|
public decimal PriceSitting { get; set; }
|
|
|
|
/// <summary>
|
|
/// Walker ist derzeit für Buchungen nicht verfügbar
|
|
/// </summary>
|
|
public bool NotAvailable { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gibt die Initialien zurück
|
|
/// </summary>
|
|
public string Initials
|
|
{
|
|
get
|
|
{
|
|
if (!string.IsNullOrWhiteSpace(FirstName) && !string.IsNullOrWhiteSpace(LastName))
|
|
return $"{FirstName.Substring(0, 1)}{LastName.Substring(0, 1)}";
|
|
else if (!string.IsNullOrWhiteSpace(FirstName) && FirstName.Length >= 2 && string.IsNullOrWhiteSpace(LastName))
|
|
return $"{FirstName.Substring(0, 2)}";
|
|
else if (string.IsNullOrWhiteSpace(FirstName) && string.IsNullOrWhiteSpace(LastName) && LastName.Length >= 2)
|
|
return $"{LastName.Substring(0, 2)}";
|
|
else
|
|
return "??";
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Voller Name
|
|
/// </summary>
|
|
public string FullName => $"{FirstName} {LastName}";
|
|
|
|
/// <summary>
|
|
/// Vorname + Nachname erster Buchstabe + Punkt, oder nur Vorname wenn kein Nachname
|
|
/// </summary>
|
|
public string FullNameShort => string.IsNullOrWhiteSpace(LastName) ? FirstName : $"{FirstName} {LastName[..1]}.";
|
|
}
|
|
}
|