summaryrefslogtreecommitdiff
path: root/Gestor.Model/Gestor.Model.Domain.Seguros/PerfilEmpresa.cs
blob: 6b4011154ca669c6d9ab573c575ec4b912ae3aa0 (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
using System;
using System.Collections.Generic;
using Gestor.Model.Common;
using Gestor.Model.Domain.Generic;
using Gestor.Model.Helper;
using Gestor.Model.Resources;
using Newtonsoft.Json;

namespace Gestor.Model.Domain.Seguros;

public class PerfilEmpresa : DomainBase, IDomain
{
	public Cliente Cliente { get; set; }

	public Controle Controle { get; set; }

	public TipoPavimentacao? TipoPavimento { get; set; }

	public DateTime? AnoConstrucao { get; set; }

	public TipoConstrucao? TipoConstrucao { get; set; }

	public Localizacao? Localizacao { get; set; }

	public string EquipamentoSeguranca { get; set; }

	public string EquipamentoIncendio { get; set; }

	public AtividadeEmpresa? AtividadeEmpresa { get; set; }

	public string AtividadePrincipal { get; set; }

	public bool? ExclusivoDeposito { get; set; }

	public bool? DivisaTerrenoBaldio { get; set; }

	public bool? PatrimonioHistorio { get; set; }

	public bool? PossuiTelhado { get; set; }

	public bool? CaixasEletronicos { get; set; }

	public bool? Isopainel { get; set; }

	public bool? ConstrucaoReforma { get; set; }

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

	public List<KeyValuePair<string, string>> Validate()
	{
		List<KeyValuePair<string, string>> list = ValidationHelper.AddValue();
		if (AtividadeEmpresa == Gestor.Model.Common.AtividadeEmpresa.Outro && (AtividadePrincipal == null || AtividadePrincipal == ""))
		{
			list.AddValue("Atividade Empresa", Messages.Invalido);
		}
		return list;
	}
}