Namespace: BlazorIndexedDb.Attributes
///
/// Custom Attribute to setup the model
///
public class FieldAttribute : Attribute
{
///
/// If the proerty is a keypath or requered
///
public bool IsKeyPath { get; set; }
///
/// If the property is auto incremental
///
public bool IsAutoIncremental { get; set; }
///
/// If the property are unique
///
public bool IsUnique { get; set; }
///
/// If the property must be ignored when parse into a indexedDb
///
public bool IsIgnore { get; set; }
}
///
/// Relationship between tables
///
public class RelationAttribute : Attribute
{
///
/// Property name from the Model will create a relationship. Default value Id
///
public string StoreIndexName { get; set; }
///
/// Not nullable. Field name default value RelationId must be use in indexDb Store table to save the StoreIndexName value.
/// This property no need to be created into the model to have a relationship.
///
[NotNull] public string FieldName { get; set; }
}