//-----------------------------------------------------------------------
//
// Copyright (c) lanedirt. All rights reserved.
// Licensed under the AGPLv3 license. See LICENSE.md file in the project root for full license information.
//
//-----------------------------------------------------------------------
namespace AliasServerDb;
using Microsoft.EntityFrameworkCore;
///
/// Represents an email attachment.
///
[Index(nameof(EmailId))]
public class EmailAttachment
{
///
/// Gets or sets the ID of the attachment.
///
public int Id { get; set; }
///
/// Gets or sets the bytes of the attachment.
///
public byte[] Bytes { get; set; } = null!;
///
/// Gets or sets the filename of the attachment.
///
public string Filename { get; set; } = null!;
///
/// Gets or sets the MIME type of the attachment.
///
public string MimeType { get; set; } = null!;
///
/// Gets or sets the filesize of the attachment.
///
public int Filesize { get; set; }
///
/// Gets or sets the date of the attachment.
///
public DateTime Date { get; set; }
///
/// Gets or sets the ID of the email that the attachment belongs to.
///
public int EmailId { get; set; }
///
/// Gets or sets the email that the attachment belongs to.
///
public virtual Email Email { get; set; } = null!;
}