Candidato.cs 968 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using ConcursoProjetos.Data;
  2. using ConcursoProjetos.Domain.DomainCore;
  3. namespace ConcursoProjetos.Domain.Entities;
  4. public class Candidato : Entity, IEquatable<Candidato>
  5. {
  6. public string Cpf { get; set; }
  7. public string NomeCompleto { get; set; }
  8. public string Telefone { get; set; }
  9. public string Email { get; set; }
  10. public bool TipoPessoa { get; set; }
  11. public string Cnpj { get; set; }
  12. public string EmpresaRazaoSocial { get; set; }
  13. public string EmpresaTelefone { get; set; }
  14. public string EmpresaEmail { get; set; }
  15. public string UserId { get; set; }
  16. public virtual ApplicationUser User { get; set; }
  17. public override bool Equals(object? obj)
  18. {
  19. return Equals(obj as Candidato);
  20. }
  21. public bool Equals(Candidato? other)
  22. {
  23. return other is not null &&
  24. (Cpf == other.Cpf || Email == other.Email);
  25. }
  26. }
  27. public enum TipoPessoa
  28. {
  29. Fisica = 1,
  30. Juridica = 2
  31. }