I have an entity called Requests that satisfies the following business:
In a request I am sending a Client (Entity) from one Bed (Entity) to another Bed (Entity). Here is the current mapping:
using System;
using SG.ProjetoTCC.Domain.Entities.Local;
namespace SG.ProjetoTCC.Domain.Entities
{
public class Solicitacao
{
public Solicitacao()
{
SolicitacaoId = Guid.NewGuid();
}
public Guid SolicitacaoId { get; set; }
public DateTime DataSolicitacao { get; set; }
public Guid FuncionarioSolicitanteId { get; set; }
public virtual Funcionario FuncionarioSolicitante { get; set; }
public TipoSolicitacao TipoSolicitacao { get; set; }
public Guid ClienteId { get; set; }
public virtual Cliente Cliente { get; set; }
public Guid LeitoLocalId { get; set; }
public virtual Leito LeitoLocal { get; set; }
public Guid LeitoDestinoId { get; set; }
public virtual Leito LeitoDestino { get; set; }
public DateTime DataReserva { get; set; }
public Guid FuncionarioReservaId { get; set; }
public virtual Funcionario FuncionarioReserva { get; set; }
public DateTime DataConclusao { get; set; }
public Guid FuncionarioConclusaoId { get; set; }
public virtual Funcionario FuncionarioConclusao { get; set; }
public DateTime Tempo { get; set; }
}
}
A Request does not have many (IEnumerable) Employees, it has 3 employees, which are: Official Requestor (who requested a bed), ReservationReservator (who reserved the bed) and OfficialConclusion (who placed the client in the destination Bed), and also 2 beds; LeitoLocal, and LeitoDestino.
Sorry if it got too confusing, but I think you can understand it the way I explained.
Thanks,
Hugs.