//-----------------------------------------------------------------------
//
// Copyright (c) lanedirt. All rights reserved.
// Licensed under the AGPLv3 license. See LICENSE.md file in the project root for full license information.
//
//-----------------------------------------------------------------------
namespace AliasClientDb;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using AliasClientDb.Abstracts;
///
/// Attachment entity.
///
public class Attachment : SyncableEntity
{
///
/// Gets or sets the attachment primary key.
///
[Key]
public Guid Id { get; set; }
///
/// Gets or sets the filename value.
///
[StringLength(255)]
public string Filename { get; set; } = string.Empty;
///
/// Gets or sets the file blob.
///
public byte[] Blob { get; set; } = null!;
///
/// Gets or sets the credential foreign key.
///
public Guid CredentialId { get; set; }
///
/// Gets or sets the credential navigation property.
///
[ForeignKey("CredentialId")]
public virtual Credential Credential { get; set; } = null!;
}