using System; namespace Umbraco.Core.Persistence.DatabaseAnnotations { /// /// Attribute that represents a Foreign Key reference /// [AttributeUsage(AttributeTargets.Property, AllowMultiple = true)] public class ForeignKeyAttribute : ReferencesAttribute { public ForeignKeyAttribute(Type type) : base(type) { } internal string OnDelete { get; set; } internal string OnUpdate { get; set; } /// /// Gets or sets the name of the foreign key refence /// /// /// Overrides the default naming of a foreign key reference: /// FK_thisTableName_refTableName /// public string Name { get; set; } /// /// Gets or sets the name of the Column that this foreign key should reference. /// /// PrimaryKey column is used by default public string Column { get; set; } } }