27 lines
785 B
C#
27 lines
785 B
C#
using CommunityToolkit.Mvvm.ComponentModel;
|
|
|
|
namespace TravelMateAdmin.Models;
|
|
|
|
public partial class Message : ObservableObject
|
|
{
|
|
public int Id { get; set; }
|
|
public string Nom { get; set; } = string.Empty;
|
|
public string Prenom { get; set; } = string.Empty;
|
|
public string Email { get; set; } = string.Empty;
|
|
public string MessageText { get; set; } = string.Empty;
|
|
|
|
[ObservableProperty]
|
|
private bool done;
|
|
|
|
public DateTime CreatedAt { get; set; }
|
|
|
|
public string FullName => $"{Prenom} {Nom}";
|
|
public string StatusText => Done ? "Traité" : "En attente";
|
|
public string CreatedAtFormatted => CreatedAt.ToString("dd/MM/yyyy HH:mm");
|
|
|
|
partial void OnDoneChanged(bool value)
|
|
{
|
|
OnPropertyChanged(nameof(StatusText));
|
|
}
|
|
}
|