feat: Implement Database Service and ViewModels for Messages and Support Requests

- Added DatabaseService to handle database operations for messages and support requests.
- Created IDatabaseService interface to define the contract for database operations.
- Developed ViewModels for Dashboard, Messages, and Support pages to manage data and commands.
- Implemented XAML views for Dashboard, Messages, and Support, including data binding and UI elements.
- Created SQL script for setting up the database schema and inserting test data.
This commit is contained in:
Van Leemput Dayron
2026-01-12 18:04:10 +01:00
parent 74586c20ba
commit f9690045ea
60 changed files with 4325 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
namespace TravelMateAdmin.Models;
public class Message
{
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;
public bool Done { get; set; }
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");
}

View File

@@ -0,0 +1,17 @@
namespace TravelMateAdmin.Models;
public class SupportRequest
{
public int Id { get; set; }
public string Nom { get; set; } = string.Empty;
public string Prenom { get; set; } = string.Empty;
public string AccountEmail { get; set; } = string.Empty;
public string ContactEmail { get; set; } = string.Empty;
public string MessageText { get; set; } = string.Empty;
public bool Done { get; set; }
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");
}