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

namespace TIAM.Entities.Emails;

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

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

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

    public Guid RecipientId { get; set; }
    public Guid EmailMessageId { get; set; }
    public string EmailAddress { get; set; }


    public virtual EmailMessage EmailMessage { get; set; }

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