using AyCode.Interfaces.Entities;
using AyCode.Interfaces.TimeStampInfo;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;

namespace TIAM.Entities.Emails;

//Update efcore, aspnetcore to 8.0.1; Implement EmailMessage, EmailRecipient; refactoring, improvments, fixes, etc...
public class EmailRecipient : IEntityGuid, ITimeStampInfo, IEmailMessageRelation
{
    public EmailRecipient()
    {
    }

    public EmailRecipient(Guid id, Guid recipientId, Guid emailMessageId) : this()
    {
        Id = id;
        RecipientId = recipientId;
        EmailMessageId = emailMessageId;
    }

    [Key, DatabaseGenerated(DatabaseGeneratedOption.None)]
    public Guid Id { get; set; }

    public Guid RecipientId { get; set; }
    public Guid EmailMessageId { get; set; }
    public virtual EmailMessage EmailMessage { get; set; }

    public DateTime Created { get; set; }
    public DateTime Modified { get; set; }
}