summaryrefslogtreecommitdiff
path: root/Gestor.Model/Gestor.Model.Domain.Seguros/Qualificacao.cs
blob: 999bf18e5a117cbc35a6308db32897f535f0744f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Globalization;
using Gestor.Model.Attributes;
using Gestor.Model.Domain.Generic;
using Gestor.Model.Helper;
using Newtonsoft.Json;

namespace Gestor.Model.Domain.Seguros;

public class Qualificacao : DomainBase, IDomain
{
	[Log(true)]
	[Description("PRÊMIO LÍQUIDO BROZE")]
	public decimal Liquido1 { get; set; }

	[Log(true)]
	[Description("PRÊMIO LÍQUIDO PRATA")]
	public decimal Liquido2 { get; set; }

	[Log(true)]
	[Description("PRÊMIO LÍQUIDO OURO")]
	public decimal Liquido3 { get; set; }

	[Log(true)]
	[Description("MÉDIA DE COMISSÃO BRONZE")]
	public decimal Comissao1 { get; set; }

	[Log(true)]
	[Description("MÉDIA DE COMISSÃO PRATA")]
	public decimal Comissao2 { get; set; }

	[Log(true)]
	[Description("MÉDIA DE COMISSÃO OURO")]
	public decimal Comissao3 { get; set; }

	[Log(true)]
	[Description("RESULTADO BRONZE")]
	public decimal Resultado1 { get; set; }

	[Log(true)]
	[Description("RESULTADO PRATA")]
	public decimal Resultado2 { get; set; }

	[Log(true)]
	[Description("RESULTADO OURO")]
	public decimal Resultado3 { get; set; }

	[JsonIgnore]
	public Func<List<KeyValuePair<string, string>>> ValidationEvent => Validate;

	public List<KeyValuePair<string, string>> Validate()
	{
		return ValidationHelper.AddValue();
	}

	public List<TupleList> Log()
	{
		return new List<TupleList>
		{
			new TupleList
			{
				Tuples = new ObservableCollection<Tuple<string, string, string>>
				{
					new Tuple<string, string, string>("PRÊMIO LÍQUIDO$", "", ""),
					new Tuple<string, string, string>("   BRONZE", Liquido1.ToString(new CultureInfo("pt-BR")), ""),
					new Tuple<string, string, string>("   PRATA", Liquido2.ToString(new CultureInfo("pt-BR")), ""),
					new Tuple<string, string, string>("   OURO", Liquido3.ToString(new CultureInfo("pt-BR")), "")
				}
			},
			new TupleList
			{
				Tuples = new ObservableCollection<Tuple<string, string, string>>
				{
					new Tuple<string, string, string>("MÉDIA DE COMISSÃO$", "", ""),
					new Tuple<string, string, string>("   BRONZE", Comissao1.ToString(new CultureInfo("pt-BR")), ""),
					new Tuple<string, string, string>("   PRATA", Comissao2.ToString(new CultureInfo("pt-BR")), ""),
					new Tuple<string, string, string>("   OURO", Comissao3.ToString(new CultureInfo("pt-BR")), "")
				}
			},
			new TupleList
			{
				Tuples = new ObservableCollection<Tuple<string, string, string>>
				{
					new Tuple<string, string, string>("RESULTADO$", "", ""),
					new Tuple<string, string, string>("   BRONZE", Resultado1.ToString(new CultureInfo("pt-BR")), ""),
					new Tuple<string, string, string>("   PRATA", Resultado2.ToString(new CultureInfo("pt-BR")), ""),
					new Tuple<string, string, string>("   OURO", Resultado3.ToString(new CultureInfo("pt-BR")), "")
				}
			}
		};
	}
}