using System; namespace Umbraco.Core.Persistence.DatabaseAnnotations { /// /// Attribute that represents a Primary Key /// /// /// By default, Clustered and AutoIncrement is set to true. /// [AttributeUsage(AttributeTargets.Property)] public class PrimaryKeyColumnAttribute : Attribute { public PrimaryKeyColumnAttribute() { Clustered = true; AutoIncrement = true; } /// /// Gets or sets a boolean indicating whether the primary key is clustered. /// /// Defaults to true public bool Clustered { get; set; } /// /// Gets or sets a boolean indicating whether the primary key is auto incremented. /// /// Defaults to true public bool AutoIncrement { get; set; } /// /// Gets or sets the name of the PrimaryKey. /// /// /// Overrides the default naming of a PrimaryKey constraint: /// PK_tableName /// public string Name { get; set; } /// /// Gets or sets the names of the columns for this PrimaryKey. /// /// /// Should only be used if the PrimaryKey spans over multiple columns. /// Usage: [nodeId], [otherColumn] /// public string OnColumns { get; set; } /// /// Gets or sets the Identity Seed, which is used for Sql Ce databases. /// /// /// We'll only look for changes to seeding and apply them if the configured database /// is an Sql Ce database. /// public int IdentitySeed { get; set; } } }