//-----------------------------------------------------------------------
//
// 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;
///
/// FieldValue entity that stores encrypted field values.
///
public class FieldValue : SyncableEntity
{
///
/// Gets or sets the field value ID.
///
[Key]
public Guid Id { get; set; }
///
/// Gets or sets the item ID.
///
[Required]
public Guid ItemId { get; set; }
///
/// Gets or sets the item object.
///
[ForeignKey("ItemId")]
public virtual Item Item { get; set; } = null!;
///
/// Gets or sets the field definition ID.
///
[Required]
public Guid FieldDefinitionId { get; set; }
///
/// Gets or sets the field definition object.
///
[ForeignKey("FieldDefinitionId")]
public virtual FieldDefinition FieldDefinition { get; set; } = null!;
///
/// Gets or sets the encrypted value.
///
public string? Value { get; set; }
///
/// Gets or sets the weight for sorting field values in the UI.
///
public int Weight { get; set; } = 0;
}