Files
Umbraco-CMS/src/Umbraco.Core/Models/Rdbms/RelationDto.cs
Morten Christensen 28d9784c1b Reverting changes to DTOs to re-enable foreign key constraints.
Adding temporary condition to executing database schema creation code to skip foreign key constraints for sql ce.
2012-12-04 08:16:10 -01:00

36 lines
1.0 KiB
C#

using System;
using Umbraco.Core.Persistence;
using Umbraco.Core.Persistence.DatabaseAnnotations;
namespace Umbraco.Core.Models.Rdbms
{
[TableName("umbracoRelation")]
[PrimaryKey("id")]
[ExplicitColumns]
internal class RelationDto
{
[Column("id")]
[PrimaryKeyColumn]
public int Id { get; set; }
[Column("parentId")]
[ForeignKey(typeof(NodeDto), Name = "FK_umbracoRelation_umbracoNode")]
public int ParentId { get; set; }
[Column("childId")]
[ForeignKey(typeof(NodeDto), Name = "FK_umbracoRelation_umbracoNode1")]
public int ChildId { get; set; }
[Column("relType")]
[ForeignKey(typeof(RelationTypeDto))]
public int RelationType { get; set; }
[Column("datetime")]
[Constraint(Default = "getdate()")]
public DateTime Datetime { get; set; }
[Column("comment")]
[Length(1000)]
public string Comment { get; set; }
}
}