blob: 609596f7e4fdfa288e093309686e6551e8e7ecbb (
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
|
using System;
using System.Collections.Generic;
using Gestor.Model.Common;
using Gestor.Model.Domain.Common;
using Gestor.Model.Domain.Generic;
using Gestor.Model.Helper;
using Gestor.Model.Resources;
using Newtonsoft.Json;
namespace Gestor.Model.Domain.Seguros;
public class SeguradoraContato : TelefoneBase, IDomain
{
private string _nome;
private string _email;
public Empresa Empresa { get; set; }
public Seguradora Seguradora { get; set; }
public TipoContatoSeguradora TipoContato { get; set; }
public string NomeContato
{
get
{
return _nome;
}
set
{
_nome = value;
}
}
public string Email
{
get
{
return _email?.ToLower();
}
set
{
_email = value;
}
}
[JsonIgnore]
public Func<List<KeyValuePair<string, string>>> ValidationEvent => Validate;
public List<KeyValuePair<string, string>> Validate()
{
List<KeyValuePair<string, string>> list = ValidateBase();
if (string.IsNullOrWhiteSpace(NomeContato) && TipoContato == TipoContatoSeguradora.Contato)
{
list.AddValue("NomeContato|NOME CONTATO", Messages.Obrigatorio);
}
return list;
}
}
|