2012-10-03 06:57:58 -02:00
|
|
|
|
using System;
|
|
|
|
|
|
using Umbraco.Core.Persistence;
|
2012-10-18 11:49:44 -02:00
|
|
|
|
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
2012-10-03 06:57:58 -02:00
|
|
|
|
|
|
|
|
|
|
namespace Umbraco.Core.Models.Rdbms
|
|
|
|
|
|
{
|
|
|
|
|
|
[TableName("umbracoRelation")]
|
|
|
|
|
|
[PrimaryKey("id")]
|
|
|
|
|
|
[ExplicitColumns]
|
|
|
|
|
|
internal class RelationDto
|
|
|
|
|
|
{
|
|
|
|
|
|
[Column("id")]
|
2012-10-18 11:49:44 -02:00
|
|
|
|
[PrimaryKeyColumn]
|
2012-10-03 06:57:58 -02:00
|
|
|
|
public int Id { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[Column("parentId")]
|
2012-10-18 11:49:44 -02:00
|
|
|
|
[ForeignKey(typeof(NodeDto), Name = "FK_umbracoRelation_umbracoNode")]
|
2012-10-03 06:57:58 -02:00
|
|
|
|
public int ParentId { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[Column("childId")]
|
2012-10-18 11:49:44 -02:00
|
|
|
|
[ForeignKey(typeof(NodeDto), Name = "FK_umbracoRelation_umbracoNode1")]
|
2012-10-03 06:57:58 -02:00
|
|
|
|
public int ChildId { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[Column("relType")]
|
2012-10-18 11:49:44 -02:00
|
|
|
|
[ForeignKey(typeof(RelationTypeDto))]
|
2012-10-03 06:57:58 -02:00
|
|
|
|
public int RelationType { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[Column("datetime")]
|
2012-10-18 11:49:44 -02:00
|
|
|
|
[Constraint(Default = "getdate()")]
|
2012-10-03 06:57:58 -02:00
|
|
|
|
public DateTime Datetime { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[Column("comment")]
|
2012-10-22 12:52:29 -02:00
|
|
|
|
[Length(1000)]
|
2012-10-03 06:57:58 -02:00
|
|
|
|
public string Comment { get; set; }
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|