public Participante(Guid id, string nome, VoucherParticipante voucher) : base(id, nome, TipoPessoaEnum.Participante, voucher) { if (VoucherParticipante.Valor < 0) { throw new InvalidOperationException("Valor do voucher do participante está menor que 0"); } }
public Pessoa(Guid id, string nome, TipoPessoaEnum tipoPessoaEnum, VoucherParticipante voucherParticipante) : base(id, nome) { if (Id == Guid.Empty) { throw new Exception("Id da pessoa está vazio"); } if (string.IsNullOrEmpty(Nome)) { throw new Exception("Nome da pessoa está vazio"); } TipoPessoa = tipoPessoaEnum; VoucherParticipante = voucherParticipante; }