//----------------------------------------------------------------------- // // Copyright (c) aliasvault. 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; /// /// The TotpCode class that stores 2FA information associated with a credential. /// public class TotpCode : SyncableEntity { /// /// Gets or sets the ID. /// [Key] [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public Guid Id { get; set; } /// /// Gets or sets the name of the TOTP code. /// [MaxLength(255)] public string Name { get; set; } = string.Empty; /// /// Gets or sets the secret key for the TOTP code. /// [MaxLength(255)] public string SecretKey { get; set; } = string.Empty; /// /// Gets or sets the credential ID. /// public Guid CredentialId { get; set; } /// /// Gets or sets the credential. /// [ForeignKey("CredentialId")] public virtual Credential? Credential { get; set; } }