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:
16
TravelMateAdmin/Models/Message.cs
Normal file
16
TravelMateAdmin/Models/Message.cs
Normal 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");
|
||||
}
|
||||
17
TravelMateAdmin/Models/SupportRequest.cs
Normal file
17
TravelMateAdmin/Models/SupportRequest.cs
Normal 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");
|
||||
}
|
||||
Reference in New Issue
Block a user