diff --git a/Sources/Modele/Echeance.cs b/Sources/Modele/Echeance.cs index 4309680..c59dc5e 100644 --- a/Sources/Modele/Echeance.cs +++ b/Sources/Modele/Echeance.cs @@ -20,15 +20,17 @@ namespace Model public MethodePayement ModePayement { get; private set; } public bool IsDebit { get; private set; } + public TagOperation Tag { get; private set; } [JsonConstructor] - public Echeance(string intituleOperation, double montant, DateTime dateOperation, MethodePayement modePayement, bool isDebit = true) + public Echeance(string intituleOperation, double montant, DateTime dateOperation, MethodePayement modePayement, TagOperation tag, bool isDebit = true) { IntituleOperation = intituleOperation; Montant = montant; DateOperation = dateOperation; ModePayement = modePayement; IsDebit = isDebit; + Tag = tag; } public override string ToString() diff --git a/Sources/Modele/Operation.cs b/Sources/Modele/Operation.cs index d847bfa..80852ac 100644 --- a/Sources/Modele/Operation.cs +++ b/Sources/Modele/Operation.cs @@ -33,14 +33,17 @@ namespace Model public bool IsDebit { get; private set; } + public TagOperation Tag { get; private set; } + [JsonConstructor] - public Operation(string intituleOperation, double montant, DateTime dateOperation, MethodePayement modePayement, bool isDebit=true) + public Operation(string intituleOperation, double montant, DateTime dateOperation, MethodePayement modePayement, TagOperation tag, bool isDebit=true) { IntituleOperation = intituleOperation; Montant = montant; DateOperation = dateOperation; ModePayement = modePayement; IsDebit = isDebit; + Tag = tag; } void OnPropertyChanged(string propertyName) => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); diff --git a/Sources/Modele/Planification.cs b/Sources/Modele/Planification.cs index 5df0a7d..d4749df 100644 --- a/Sources/Modele/Planification.cs +++ b/Sources/Modele/Planification.cs @@ -1,4 +1,5 @@ -using Newtonsoft.Json; +using Microsoft.Maui.Controls; +using Newtonsoft.Json; using System; using System.Collections.Generic; using System.ComponentModel; @@ -17,26 +18,25 @@ namespace Model public DateTime DateOperation { get; private set; } - public int Frequance { get; private set; }//en mois ? - public MethodePayement ModePayement { get; private set; } public bool IsDebit { get; private set; } + public TagOperation Tag { get; private set; } [JsonConstructor] - public Planification(string intituleOperation, double montant, DateTime dateOperation, int frequance, MethodePayement modePayement, bool isDebit = true) + public Planification(string intituleOperation, double montant, DateTime dateOperation, MethodePayement modePayement, TagOperation tag, bool isDebit = true) { IntituleOperation = intituleOperation; Montant = montant; DateOperation = dateOperation; - Frequance = frequance; ModePayement = modePayement; IsDebit = isDebit; + Tag = tag; } public override string ToString() { - return IntituleOperation + " " + DateOperation + " " + Montant + " " + ModePayement + " " + IsDebit + " " + Frequance; + return IntituleOperation + " " + DateOperation + " " + Montant + " " + ModePayement + " " + IsDebit + " " + Tag; } } } diff --git a/Sources/Modele/TagOperation.cs b/Sources/Modele/TagOperation.cs new file mode 100644 index 0000000..7d65332 --- /dev/null +++ b/Sources/Modele/TagOperation.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Model +{ + public enum TagOperation + { + Alimentaire, + Carburant, + Habitation, + Energie, + Telephonie, + Loisir, + Restauration, + Divers, + Transport, + Transaction, + Santé + } +}