Reorg code, move dtos
This commit is contained in:
@@ -13,8 +13,8 @@ using Umbraco.Core.Exceptions;
|
||||
using Umbraco.Core.IO;
|
||||
using Umbraco.Core.Logging;
|
||||
using Umbraco.Core.Migrations.Upgrade;
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
using Umbraco.Core.Persistence;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
using Umbraco.Core.Persistence.Mappers;
|
||||
using Umbraco.Core.Persistence.SqlSyntax;
|
||||
using Umbraco.Core.Scoping;
|
||||
|
||||
@@ -3,7 +3,7 @@ using NPoco;
|
||||
using Umbraco.Core.Configuration;
|
||||
using Umbraco.Core.Logging;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
|
||||
namespace Umbraco.Core.Migrations.Install
|
||||
{
|
||||
|
||||
@@ -4,9 +4,9 @@ using System.Linq;
|
||||
using NPoco;
|
||||
using Umbraco.Core.Events;
|
||||
using Umbraco.Core.Logging;
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
using Umbraco.Core.Persistence;
|
||||
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
using Umbraco.Core.Persistence.SqlSyntax;
|
||||
|
||||
namespace Umbraco.Core.Migrations.Install
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
|
||||
namespace Umbraco.Core.Migrations.Upgrade.V_7_6_0
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
using Umbraco.Core.Persistence.SqlSyntax;
|
||||
|
||||
namespace Umbraco.Core.Migrations.Upgrade.V_7_7_0
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using System.Linq;
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
|
||||
namespace Umbraco.Core.Migrations.Upgrade.V_7_7_0
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Linq;
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
using Umbraco.Core.Persistence;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
|
||||
namespace Umbraco.Core.Migrations.Upgrade.V_7_7_0
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
|
||||
namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0
|
||||
{
|
||||
|
||||
@@ -3,9 +3,9 @@ using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using Umbraco.Core.Migrations.Install;
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
using Umbraco.Core.Persistence;
|
||||
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
|
||||
namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
using System.Linq;
|
||||
using System.Linq;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
|
||||
namespace Umbraco.Core.Models.Membership
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
using System.IO;
|
||||
using Umbraco.Core.Logging;
|
||||
using Umbraco.Core.Models.EntityBase;
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
|
||||
namespace Umbraco.Core.Models
|
||||
{
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.Access)]
|
||||
[PrimaryKey("id", AutoIncrement = false)]
|
||||
+1
-1
@@ -3,7 +3,7 @@ using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.AccessRule)]
|
||||
[PrimaryKey("id", AutoIncrement = false)]
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.CacheInstruction)]
|
||||
[PrimaryKey("id")]
|
||||
+33
-35
@@ -1,35 +1,33 @@
|
||||
using System;
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
{
|
||||
[TableName(TableName)]
|
||||
[PrimaryKey("nodeId", AutoIncrement = false)]
|
||||
[ExplicitColumns]
|
||||
internal class ContentDto
|
||||
{
|
||||
private const string TableName = Constants.DatabaseSchema.Tables.Content;
|
||||
|
||||
[Column("nodeId")]
|
||||
[PrimaryKeyColumn(AutoIncrement = false)]
|
||||
[ForeignKey(typeof(NodeDto))]
|
||||
public int NodeId { get; set; }
|
||||
|
||||
[Column("contentTypeId")]
|
||||
[ForeignKey(typeof(ContentTypeDto), Column = "NodeId")]
|
||||
public int ContentTypeId { get; set; }
|
||||
|
||||
[ResultColumn]
|
||||
[Reference(ReferenceType.OneToOne, ColumnName = "NodeId")]
|
||||
public NodeDto NodeDto { get; set; }
|
||||
|
||||
// although a content has many content versions,
|
||||
// they can only be loaded one by one (as several content),
|
||||
// so this here is a OneToOne reference
|
||||
[ResultColumn]
|
||||
[Reference(ReferenceType.OneToOne, ReferenceMemberName = "NodeId")]
|
||||
public ContentVersionDto ContentVersionDto { get; set; }
|
||||
}
|
||||
}
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(TableName)]
|
||||
[PrimaryKey("nodeId", AutoIncrement = false)]
|
||||
[ExplicitColumns]
|
||||
internal class ContentDto
|
||||
{
|
||||
private const string TableName = Constants.DatabaseSchema.Tables.Content;
|
||||
|
||||
[Column("nodeId")]
|
||||
[PrimaryKeyColumn(AutoIncrement = false)]
|
||||
[ForeignKey(typeof(NodeDto))]
|
||||
public int NodeId { get; set; }
|
||||
|
||||
[Column("contentTypeId")]
|
||||
[ForeignKey(typeof(ContentTypeDto), Column = "NodeId")]
|
||||
public int ContentTypeId { get; set; }
|
||||
|
||||
[ResultColumn]
|
||||
[Reference(ReferenceType.OneToOne, ColumnName = "NodeId")]
|
||||
public NodeDto NodeDto { get; set; }
|
||||
|
||||
// although a content has many content versions,
|
||||
// they can only be loaded one by one (as several content),
|
||||
// so this here is a OneToOne reference
|
||||
[ResultColumn]
|
||||
[Reference(ReferenceType.OneToOne, ReferenceMemberName = "NodeId")]
|
||||
public ContentVersionDto ContentVersionDto { get; set; }
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.NodeData)]
|
||||
[PrimaryKey("nodeId", AutoIncrement = false)]
|
||||
+19
-19
@@ -1,19 +1,19 @@
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.ElementTypeTree)]
|
||||
[ExplicitColumns]
|
||||
internal class ContentType2ContentTypeDto
|
||||
{
|
||||
[Column("parentContentTypeId")]
|
||||
[PrimaryKeyColumn(AutoIncrement = false, Clustered = true, Name = "PK_cmsContentType2ContentType", OnColumns = "parentContentTypeId, childContentTypeId")]
|
||||
[ForeignKey(typeof(NodeDto), Name = "FK_cmsContentType2ContentType_umbracoNode_parent")]
|
||||
public int ParentId { get; set; }
|
||||
|
||||
[Column("childContentTypeId")]
|
||||
[ForeignKey(typeof(NodeDto), Name = "FK_cmsContentType2ContentType_umbracoNode_child")]
|
||||
public int ChildId { get; set; }
|
||||
}
|
||||
}
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.ElementTypeTree)]
|
||||
[ExplicitColumns]
|
||||
internal class ContentType2ContentTypeDto
|
||||
{
|
||||
[Column("parentContentTypeId")]
|
||||
[PrimaryKeyColumn(AutoIncrement = false, Clustered = true, Name = "PK_cmsContentType2ContentType", OnColumns = "parentContentTypeId, childContentTypeId")]
|
||||
[ForeignKey(typeof(NodeDto), Name = "FK_cmsContentType2ContentType_umbracoNode_parent")]
|
||||
public int ParentId { get; set; }
|
||||
|
||||
[Column("childContentTypeId")]
|
||||
[ForeignKey(typeof(NodeDto), Name = "FK_cmsContentType2ContentType_umbracoNode_child")]
|
||||
public int ChildId { get; set; }
|
||||
}
|
||||
}
|
||||
+28
-29
@@ -1,29 +1,28 @@
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.ContentChildType)]
|
||||
[PrimaryKey("Id", AutoIncrement = false)]
|
||||
[ExplicitColumns]
|
||||
internal class ContentTypeAllowedContentTypeDto
|
||||
{
|
||||
[Column("Id")]
|
||||
[ForeignKey(typeof(ContentTypeDto), Name = "FK_cmsContentTypeAllowedContentType_cmsContentType", Column = "nodeId")]
|
||||
[PrimaryKeyColumn(AutoIncrement = false, Clustered = true, Name = "PK_cmsContentTypeAllowedContentType", OnColumns = "Id, AllowedId")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column("AllowedId")]
|
||||
[ForeignKey(typeof(ContentTypeDto), Name = "FK_cmsContentTypeAllowedContentType_cmsContentType1", Column = "nodeId")]
|
||||
public int AllowedId { get; set; }
|
||||
|
||||
[Column("SortOrder")]
|
||||
[Constraint(Name = "df_cmsContentTypeAllowedContentType_sortOrder", Default = "0")]
|
||||
public int SortOrder { get; set; }
|
||||
|
||||
[ResultColumn]
|
||||
[Reference(ReferenceType.OneToOne)]
|
||||
public ContentTypeDto ContentTypeDto { get; set; }
|
||||
}
|
||||
}
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.ContentChildType)]
|
||||
[PrimaryKey("Id", AutoIncrement = false)]
|
||||
[ExplicitColumns]
|
||||
internal class ContentTypeAllowedContentTypeDto
|
||||
{
|
||||
[Column("Id")]
|
||||
[ForeignKey(typeof(ContentTypeDto), Name = "FK_cmsContentTypeAllowedContentType_cmsContentType", Column = "nodeId")]
|
||||
[PrimaryKeyColumn(AutoIncrement = false, Clustered = true, Name = "PK_cmsContentTypeAllowedContentType", OnColumns = "Id, AllowedId")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column("AllowedId")]
|
||||
[ForeignKey(typeof(ContentTypeDto), Name = "FK_cmsContentTypeAllowedContentType_cmsContentType1", Column = "nodeId")]
|
||||
public int AllowedId { get; set; }
|
||||
|
||||
[Column("SortOrder")]
|
||||
[Constraint(Name = "df_cmsContentTypeAllowedContentType_sortOrder", Default = "0")]
|
||||
public int SortOrder { get; set; }
|
||||
|
||||
[ResultColumn]
|
||||
[Reference(ReferenceType.OneToOne)]
|
||||
public ContentTypeDto ContentTypeDto { get; set; }
|
||||
}
|
||||
}
|
||||
+53
-53
@@ -1,53 +1,53 @@
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.ContentType)]
|
||||
[PrimaryKey("pk")]
|
||||
[ExplicitColumns]
|
||||
internal class ContentTypeDto
|
||||
{
|
||||
[Column("pk")]
|
||||
[PrimaryKeyColumn(IdentitySeed = 535)]
|
||||
public int PrimaryKey { get; set; }
|
||||
|
||||
[Column("nodeId")]
|
||||
[ForeignKey(typeof(NodeDto))]
|
||||
[Index(IndexTypes.UniqueNonClustered, Name = "IX_cmsContentType")]
|
||||
public int NodeId { get; set; }
|
||||
|
||||
[Column("alias")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public string Alias { get; set; }
|
||||
|
||||
[Column("icon")]
|
||||
[Index(IndexTypes.NonClustered)]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public string Icon { get; set; }
|
||||
|
||||
[Column("thumbnail")]
|
||||
[Constraint(Default = "folder.png")]
|
||||
public string Thumbnail { get; set; }
|
||||
|
||||
[Column("description")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[Length(1500)]
|
||||
public string Description { get; set; }
|
||||
|
||||
[Column("isContainer")]
|
||||
[Constraint(Default = "0")]
|
||||
public bool IsContainer { get; set; }
|
||||
|
||||
[Column("allowAtRoot")]
|
||||
[Constraint(Default = "0")]
|
||||
public bool AllowAtRoot { get; set; }
|
||||
|
||||
[Column("variations")]
|
||||
[Constraint(Default = "1" /*ContentVariation.InvariantNeutral*/)]
|
||||
public byte Variations { get; set; }
|
||||
|
||||
[ResultColumn]
|
||||
public NodeDto NodeDto { get; set; }
|
||||
}
|
||||
}
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.ContentType)]
|
||||
[PrimaryKey("pk")]
|
||||
[ExplicitColumns]
|
||||
internal class ContentTypeDto
|
||||
{
|
||||
[Column("pk")]
|
||||
[PrimaryKeyColumn(IdentitySeed = 535)]
|
||||
public int PrimaryKey { get; set; }
|
||||
|
||||
[Column("nodeId")]
|
||||
[ForeignKey(typeof(NodeDto))]
|
||||
[Index(IndexTypes.UniqueNonClustered, Name = "IX_cmsContentType")]
|
||||
public int NodeId { get; set; }
|
||||
|
||||
[Column("alias")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public string Alias { get; set; }
|
||||
|
||||
[Column("icon")]
|
||||
[Index(IndexTypes.NonClustered)]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public string Icon { get; set; }
|
||||
|
||||
[Column("thumbnail")]
|
||||
[Constraint(Default = "folder.png")]
|
||||
public string Thumbnail { get; set; }
|
||||
|
||||
[Column("description")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[Length(1500)]
|
||||
public string Description { get; set; }
|
||||
|
||||
[Column("isContainer")]
|
||||
[Constraint(Default = "0")]
|
||||
public bool IsContainer { get; set; }
|
||||
|
||||
[Column("allowAtRoot")]
|
||||
[Constraint(Default = "0")]
|
||||
public bool AllowAtRoot { get; set; }
|
||||
|
||||
[Column("variations")]
|
||||
[Constraint(Default = "1" /*ContentVariation.InvariantNeutral*/)]
|
||||
public byte Variations { get; set; }
|
||||
|
||||
[ResultColumn]
|
||||
public NodeDto NodeDto { get; set; }
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.DocumentType)]
|
||||
[PrimaryKey("contentTypeNodeId", AutoIncrement = false)]
|
||||
+48
-48
@@ -1,48 +1,48 @@
|
||||
using System;
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
{
|
||||
[TableName(TableName)]
|
||||
[PrimaryKey("id")]
|
||||
[ExplicitColumns]
|
||||
internal class ContentVersionDto
|
||||
{
|
||||
private const string TableName = Constants.DatabaseSchema.Tables.ContentVersion;
|
||||
|
||||
[Column("id")]
|
||||
[PrimaryKeyColumn]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column("nodeId")]
|
||||
[ForeignKey(typeof(ContentDto))]
|
||||
public int NodeId { get; set; }
|
||||
|
||||
[Column("versionDate")]
|
||||
[Constraint(Default = SystemMethods.CurrentDateTime)]
|
||||
public DateTime VersionDate { get; set; }
|
||||
|
||||
[Column("userId")]
|
||||
public int UserId { get; set; }
|
||||
|
||||
[Column("current")]
|
||||
public bool Current { get; set; }
|
||||
|
||||
// about current:
|
||||
// there is nothing in the DB that guarantees that there will be one, and exactly one, current version per content item.
|
||||
// that would require circular FKs that are impossible (well, it is possible to create them, but not to insert).
|
||||
// we could use a content.currentVersionId FK that would need to be nullable, or (better?) an additional table
|
||||
// linking a content itemt to its current version (nodeId, versionId) - that would guarantee uniqueness BUT it would
|
||||
// not guarantee existence - so, really... we are trusting our code to manage 'current' correctly.
|
||||
|
||||
[Column("text")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public string Text { get; set; }
|
||||
|
||||
[ResultColumn]
|
||||
[Reference(ReferenceType.OneToOne, ColumnName = "NodeId", ReferenceMemberName = "NodeId")]
|
||||
public ContentDto ContentDto { get; set; }
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(TableName)]
|
||||
[PrimaryKey("id")]
|
||||
[ExplicitColumns]
|
||||
internal class ContentVersionDto
|
||||
{
|
||||
private const string TableName = Constants.DatabaseSchema.Tables.ContentVersion;
|
||||
|
||||
[Column("id")]
|
||||
[PrimaryKeyColumn]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column("nodeId")]
|
||||
[ForeignKey(typeof(ContentDto))]
|
||||
public int NodeId { get; set; }
|
||||
|
||||
[Column("versionDate")]
|
||||
[Constraint(Default = SystemMethods.CurrentDateTime)]
|
||||
public DateTime VersionDate { get; set; }
|
||||
|
||||
[Column("userId")]
|
||||
public int UserId { get; set; }
|
||||
|
||||
[Column("current")]
|
||||
public bool Current { get; set; }
|
||||
|
||||
// about current:
|
||||
// there is nothing in the DB that guarantees that there will be one, and exactly one, current version per content item.
|
||||
// that would require circular FKs that are impossible (well, it is possible to create them, but not to insert).
|
||||
// we could use a content.currentVersionId FK that would need to be nullable, or (better?) an additional table
|
||||
// linking a content itemt to its current version (nodeId, versionId) - that would guarantee uniqueness BUT it would
|
||||
// not guarantee existence - so, really... we are trusting our code to manage 'current' correctly.
|
||||
|
||||
[Column("text")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public string Text { get; set; }
|
||||
|
||||
[ResultColumn]
|
||||
[Reference(ReferenceType.OneToOne, ColumnName = "NodeId", ReferenceMemberName = "NodeId")]
|
||||
public ContentDto ContentDto { get; set; }
|
||||
}
|
||||
}
|
||||
+23
-23
@@ -1,23 +1,23 @@
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.NodeXml)]
|
||||
[PrimaryKey("nodeId", AutoIncrement = false)]
|
||||
[ExplicitColumns]
|
||||
internal class ContentXmlDto
|
||||
{
|
||||
[Column("nodeId")]
|
||||
[PrimaryKeyColumn(AutoIncrement = false)]
|
||||
[ForeignKey(typeof(ContentDto), Column = "nodeId")]
|
||||
public int NodeId { get; set; }
|
||||
|
||||
[Column("xml")]
|
||||
[SpecialDbType(SpecialDbTypes.NTEXT)]
|
||||
public string Xml { get; set; }
|
||||
|
||||
[Column("rv")]
|
||||
public long Rv { get; set; }
|
||||
}
|
||||
}
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.NodeXml)]
|
||||
[PrimaryKey("nodeId", AutoIncrement = false)]
|
||||
[ExplicitColumns]
|
||||
internal class ContentXmlDto
|
||||
{
|
||||
[Column("nodeId")]
|
||||
[PrimaryKeyColumn(AutoIncrement = false)]
|
||||
[ForeignKey(typeof(ContentDto), Column = "nodeId")]
|
||||
public int NodeId { get; set; }
|
||||
|
||||
[Column("xml")]
|
||||
[SpecialDbType(SpecialDbTypes.NTEXT)]
|
||||
public string Xml { get; set; }
|
||||
|
||||
[Column("rv")]
|
||||
public long Rv { get; set; }
|
||||
}
|
||||
}
|
||||
+31
-31
@@ -1,31 +1,31 @@
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.DataType)]
|
||||
[PrimaryKey("pk")]
|
||||
[ExplicitColumns]
|
||||
internal class DataTypeDto
|
||||
{
|
||||
[Column("pk")]
|
||||
[PrimaryKeyColumn(IdentitySeed = 40)]
|
||||
public int PrimaryKey { get; set; }
|
||||
|
||||
[Column("nodeId")]
|
||||
[ForeignKey(typeof(NodeDto))]
|
||||
[Index(IndexTypes.UniqueNonClustered)]
|
||||
public int DataTypeId { get; set; }
|
||||
|
||||
[Column("propertyEditorAlias")]
|
||||
public string PropertyEditorAlias { get; set; }
|
||||
|
||||
[Column("dbType")]
|
||||
[Length(50)]
|
||||
public string DbType { get; set; }//NOTE Is set to [varchar] (50) in Sql Server script
|
||||
|
||||
[ResultColumn]
|
||||
[Reference(ReferenceType.OneToOne, ColumnName = "DataTypeId")]
|
||||
public NodeDto NodeDto { get; set; }
|
||||
}
|
||||
}
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.DataType)]
|
||||
[PrimaryKey("pk")]
|
||||
[ExplicitColumns]
|
||||
internal class DataTypeDto
|
||||
{
|
||||
[Column("pk")]
|
||||
[PrimaryKeyColumn(IdentitySeed = 40)]
|
||||
public int PrimaryKey { get; set; }
|
||||
|
||||
[Column("nodeId")]
|
||||
[ForeignKey(typeof(NodeDto))]
|
||||
[Index(IndexTypes.UniqueNonClustered)]
|
||||
public int DataTypeId { get; set; }
|
||||
|
||||
[Column("propertyEditorAlias")]
|
||||
public string PropertyEditorAlias { get; set; }
|
||||
|
||||
[Column("dbType")]
|
||||
[Length(50)]
|
||||
public string DbType { get; set; }//NOTE Is set to [varchar] (50) in Sql Server script
|
||||
|
||||
[ResultColumn]
|
||||
[Reference(ReferenceType.OneToOne, ColumnName = "DataTypeId")]
|
||||
public NodeDto NodeDto { get; set; }
|
||||
}
|
||||
}
|
||||
+50
-50
@@ -1,50 +1,50 @@
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.DataTypePreValue)]
|
||||
[PrimaryKey("id")]
|
||||
[ExplicitColumns]
|
||||
internal class DataTypePreValueDto
|
||||
{
|
||||
[Column("id")]
|
||||
[PrimaryKeyColumn(IdentitySeed = 10)]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column("datatypeNodeId")]
|
||||
[ForeignKey(typeof(DataTypeDto), Column = "nodeId")]
|
||||
public int DataTypeNodeId { get; set; }
|
||||
|
||||
[Column("value")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[SpecialDbType(SpecialDbTypes.NTEXT)]
|
||||
public string Value { get; set; }
|
||||
|
||||
[Column("sortorder")]
|
||||
public int SortOrder { get; set; }
|
||||
|
||||
[Column("alias")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[Length(50)]
|
||||
public string Alias { get; set; }
|
||||
|
||||
protected bool Equals(DataTypePreValueDto other)
|
||||
{
|
||||
return Id == other.Id;
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (ReferenceEquals(null, obj)) return false;
|
||||
if (ReferenceEquals(this, obj)) return true;
|
||||
if (obj.GetType() != this.GetType()) return false;
|
||||
return Equals((DataTypePreValueDto) obj);
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return Id;
|
||||
}
|
||||
}
|
||||
}
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.DataTypePreValue)]
|
||||
[PrimaryKey("id")]
|
||||
[ExplicitColumns]
|
||||
internal class DataTypePreValueDto
|
||||
{
|
||||
[Column("id")]
|
||||
[PrimaryKeyColumn(IdentitySeed = 10)]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column("datatypeNodeId")]
|
||||
[ForeignKey(typeof(DataTypeDto), Column = "nodeId")]
|
||||
public int DataTypeNodeId { get; set; }
|
||||
|
||||
[Column("value")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[SpecialDbType(SpecialDbTypes.NTEXT)]
|
||||
public string Value { get; set; }
|
||||
|
||||
[Column("sortorder")]
|
||||
public int SortOrder { get; set; }
|
||||
|
||||
[Column("alias")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[Length(50)]
|
||||
public string Alias { get; set; }
|
||||
|
||||
protected bool Equals(DataTypePreValueDto other)
|
||||
{
|
||||
return Id == other.Id;
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (ReferenceEquals(null, obj)) return false;
|
||||
if (ReferenceEquals(this, obj)) return true;
|
||||
if (obj.GetType() != this.GetType()) return false;
|
||||
return Equals((DataTypePreValueDto) obj);
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return Id;
|
||||
}
|
||||
}
|
||||
}
|
||||
+35
-35
@@ -1,35 +1,35 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.DictionaryEntry)]
|
||||
[PrimaryKey("pk")]
|
||||
[ExplicitColumns]
|
||||
internal class DictionaryDto
|
||||
{
|
||||
[Column("pk")]
|
||||
[PrimaryKeyColumn]
|
||||
public int PrimaryKey { get; set; }
|
||||
|
||||
[Column("id")]
|
||||
[Index(IndexTypes.UniqueNonClustered)]
|
||||
public Guid UniqueId { get; set; }
|
||||
|
||||
[Column("parent")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[ForeignKey(typeof(DictionaryDto), Column = "id")]
|
||||
public Guid? Parent { get; set; }
|
||||
|
||||
[Column("key")]
|
||||
[Length(450)]
|
||||
[Index(IndexTypes.NonClustered, Name = "IX_cmsDictionary_key")]
|
||||
public string Key { get; set; }
|
||||
|
||||
[ResultColumn]
|
||||
[Reference(ReferenceType.Many, ColumnName = "UniqueId", ReferenceMemberName = "UniqueId")]
|
||||
public List<LanguageTextDto> LanguageTextDtos { get; set; }
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.DictionaryEntry)]
|
||||
[PrimaryKey("pk")]
|
||||
[ExplicitColumns]
|
||||
internal class DictionaryDto
|
||||
{
|
||||
[Column("pk")]
|
||||
[PrimaryKeyColumn]
|
||||
public int PrimaryKey { get; set; }
|
||||
|
||||
[Column("id")]
|
||||
[Index(IndexTypes.UniqueNonClustered)]
|
||||
public Guid UniqueId { get; set; }
|
||||
|
||||
[Column("parent")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[ForeignKey(typeof(DictionaryDto), Column = "id")]
|
||||
public Guid? Parent { get; set; }
|
||||
|
||||
[Column("key")]
|
||||
[Length(450)]
|
||||
[Index(IndexTypes.NonClustered, Name = "IX_cmsDictionary_key")]
|
||||
public string Key { get; set; }
|
||||
|
||||
[ResultColumn]
|
||||
[Reference(ReferenceType.Many, ColumnName = "UniqueId", ReferenceMemberName = "UniqueId")]
|
||||
public List<LanguageTextDto> LanguageTextDtos { get; set; }
|
||||
}
|
||||
}
|
||||
+66
-66
@@ -1,66 +1,66 @@
|
||||
using System;
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
{
|
||||
[TableName(TableName)]
|
||||
[PrimaryKey("nodeId", AutoIncrement = false)]
|
||||
[ExplicitColumns]
|
||||
internal class DocumentDto
|
||||
{
|
||||
private const string TableName = Constants.DatabaseSchema.Tables.Document;
|
||||
|
||||
[Column("nodeId")]
|
||||
[PrimaryKeyColumn(AutoIncrement = false)]
|
||||
[ForeignKey(typeof(ContentDto))]
|
||||
public int NodeId { get; set; }
|
||||
|
||||
[Column("published")]
|
||||
[Index(IndexTypes.NonClustered, Name = "IX_" + TableName + "_Published")]
|
||||
public bool Published { get; set; }
|
||||
|
||||
[Column("edited")]
|
||||
public bool Edited { get; set; }
|
||||
|
||||
[Column("releaseDate")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public DateTime? ReleaseDate { get; set; }
|
||||
|
||||
[Column("expireDate")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public DateTime? ExpiresDate { get; set; }
|
||||
|
||||
//[Column("publishDate")]
|
||||
//[NullSetting(NullSetting = NullSettings.Null)] // is contentVersionDto.VersionDate for the published version
|
||||
//public DateTime? PublishDate { get; set; }
|
||||
|
||||
//[Column("publishUserId")]
|
||||
//[NullSetting(NullSetting = NullSettings.Null)] // is contentVersionDto.UserId for the published version
|
||||
//public int? PublishUserId { get; set; }
|
||||
|
||||
//[Column("publishName")]
|
||||
//[NullSetting(NullSetting = NullSettings.Null)] // is contentVersionDto.Text for the published version
|
||||
//public string PublishName { get; set; }
|
||||
|
||||
//[Column("publishTemplateId")]
|
||||
//[NullSetting(NullSetting = NullSettings.Null)] // is documentVersionDto.TemplateId for the published version
|
||||
//public int? PublishTemplateId { get; set; }
|
||||
|
||||
[ResultColumn]
|
||||
[Reference(ReferenceType.OneToOne, ReferenceMemberName = "NodeId")]
|
||||
public ContentDto ContentDto { get; set; }
|
||||
|
||||
// although a content has many content versions,
|
||||
// they can only be loaded one by one (as several content),
|
||||
// so this here is a OneToOne reference
|
||||
[ResultColumn]
|
||||
[Reference(ReferenceType.OneToOne)]
|
||||
public DocumentVersionDto DocumentVersionDto { get; set; }
|
||||
|
||||
// same
|
||||
[ResultColumn]
|
||||
[Reference(ReferenceType.OneToOne)]
|
||||
public DocumentVersionDto PublishedVersionDto { get; set; }
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(TableName)]
|
||||
[PrimaryKey("nodeId", AutoIncrement = false)]
|
||||
[ExplicitColumns]
|
||||
internal class DocumentDto
|
||||
{
|
||||
private const string TableName = Constants.DatabaseSchema.Tables.Document;
|
||||
|
||||
[Column("nodeId")]
|
||||
[PrimaryKeyColumn(AutoIncrement = false)]
|
||||
[ForeignKey(typeof(ContentDto))]
|
||||
public int NodeId { get; set; }
|
||||
|
||||
[Column("published")]
|
||||
[Index(IndexTypes.NonClustered, Name = "IX_" + TableName + "_Published")]
|
||||
public bool Published { get; set; }
|
||||
|
||||
[Column("edited")]
|
||||
public bool Edited { get; set; }
|
||||
|
||||
[Column("releaseDate")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public DateTime? ReleaseDate { get; set; }
|
||||
|
||||
[Column("expireDate")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public DateTime? ExpiresDate { get; set; }
|
||||
|
||||
//[Column("publishDate")]
|
||||
//[NullSetting(NullSetting = NullSettings.Null)] // is contentVersionDto.VersionDate for the published version
|
||||
//public DateTime? PublishDate { get; set; }
|
||||
|
||||
//[Column("publishUserId")]
|
||||
//[NullSetting(NullSetting = NullSettings.Null)] // is contentVersionDto.UserId for the published version
|
||||
//public int? PublishUserId { get; set; }
|
||||
|
||||
//[Column("publishName")]
|
||||
//[NullSetting(NullSetting = NullSettings.Null)] // is contentVersionDto.Text for the published version
|
||||
//public string PublishName { get; set; }
|
||||
|
||||
//[Column("publishTemplateId")]
|
||||
//[NullSetting(NullSetting = NullSettings.Null)] // is documentVersionDto.TemplateId for the published version
|
||||
//public int? PublishTemplateId { get; set; }
|
||||
|
||||
[ResultColumn]
|
||||
[Reference(ReferenceType.OneToOne, ReferenceMemberName = "NodeId")]
|
||||
public ContentDto ContentDto { get; set; }
|
||||
|
||||
// although a content has many content versions,
|
||||
// they can only be loaded one by one (as several content),
|
||||
// so this here is a OneToOne reference
|
||||
[ResultColumn]
|
||||
[Reference(ReferenceType.OneToOne)]
|
||||
public DocumentVersionDto DocumentVersionDto { get; set; }
|
||||
|
||||
// same
|
||||
[ResultColumn]
|
||||
[Reference(ReferenceType.OneToOne)]
|
||||
public DocumentVersionDto PublishedVersionDto { get; set; }
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using NPoco;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.Document)]
|
||||
[PrimaryKey("versionId", AutoIncrement = false)]
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(TableName)]
|
||||
[PrimaryKey("id", AutoIncrement = false)]
|
||||
+33
-33
@@ -1,33 +1,33 @@
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.Domain)]
|
||||
[PrimaryKey("id")]
|
||||
[ExplicitColumns]
|
||||
internal class DomainDto
|
||||
{
|
||||
[Column("id")]
|
||||
[PrimaryKeyColumn]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column("domainDefaultLanguage")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public int? DefaultLanguage { get; set; }
|
||||
|
||||
[Column("domainRootStructureID")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[ForeignKey(typeof(NodeDto))]
|
||||
public int? RootStructureId { get; set; }
|
||||
|
||||
[Column("domainName")]
|
||||
public string DomainName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Used for a result on the query to get the associated language for a domain if there is one
|
||||
/// </summary>
|
||||
[ResultColumn("languageISOCode")]
|
||||
public string IsoCode { get; set; }
|
||||
}
|
||||
}
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.Domain)]
|
||||
[PrimaryKey("id")]
|
||||
[ExplicitColumns]
|
||||
internal class DomainDto
|
||||
{
|
||||
[Column("id")]
|
||||
[PrimaryKeyColumn]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column("domainDefaultLanguage")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public int? DefaultLanguage { get; set; }
|
||||
|
||||
[Column("domainRootStructureID")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[ForeignKey(typeof(NodeDto))]
|
||||
public int? RootStructureId { get; set; }
|
||||
|
||||
[Column("domainName")]
|
||||
public string DomainName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Used for a result on the query to get the associated language for a domain if there is one
|
||||
/// </summary>
|
||||
[ResultColumn("languageISOCode")]
|
||||
public string IsoCode { get; set; }
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -3,7 +3,7 @@ using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.ExternalLogin)]
|
||||
[ExplicitColumns]
|
||||
+1
-1
@@ -3,7 +3,7 @@ using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.KeyValue)]
|
||||
[PrimaryKey("key", AutoIncrement = false)]
|
||||
+26
-26
@@ -1,26 +1,26 @@
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.Language)]
|
||||
[PrimaryKey("id")]
|
||||
[ExplicitColumns]
|
||||
internal class LanguageDto
|
||||
{
|
||||
[Column("id")]
|
||||
[PrimaryKeyColumn(IdentitySeed = 2)]
|
||||
public short Id { get; set; }
|
||||
|
||||
[Column("languageISOCode")]
|
||||
[Index(IndexTypes.UniqueNonClustered)]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[Length(10)]
|
||||
public string IsoCode { get; set; }
|
||||
|
||||
[Column("languageCultureName")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[Length(100)]
|
||||
public string CultureName { get; set; }
|
||||
}
|
||||
}
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.Language)]
|
||||
[PrimaryKey("id")]
|
||||
[ExplicitColumns]
|
||||
internal class LanguageDto
|
||||
{
|
||||
[Column("id")]
|
||||
[PrimaryKeyColumn(IdentitySeed = 2)]
|
||||
public short Id { get; set; }
|
||||
|
||||
[Column("languageISOCode")]
|
||||
[Index(IndexTypes.UniqueNonClustered)]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[Length(10)]
|
||||
public string IsoCode { get; set; }
|
||||
|
||||
[Column("languageCultureName")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[Length(100)]
|
||||
public string CultureName { get; set; }
|
||||
}
|
||||
}
|
||||
+28
-28
@@ -1,28 +1,28 @@
|
||||
using System;
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.DictionaryValue)]
|
||||
[PrimaryKey("pk")]
|
||||
[ExplicitColumns]
|
||||
internal class LanguageTextDto
|
||||
{
|
||||
[Column("pk")]
|
||||
[PrimaryKeyColumn]
|
||||
public int PrimaryKey { get; set; }
|
||||
|
||||
[Column("languageId")]
|
||||
[ForeignKey(typeof(LanguageDto), Column = "id")]
|
||||
public int LanguageId { get; set; }
|
||||
|
||||
[Column("UniqueId")]
|
||||
[ForeignKey(typeof(DictionaryDto), Column = "id")]
|
||||
public Guid UniqueId { get; set; }
|
||||
|
||||
[Column("value")]
|
||||
[Length(1000)]
|
||||
public string Value { get; set; }
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.DictionaryValue)]
|
||||
[PrimaryKey("pk")]
|
||||
[ExplicitColumns]
|
||||
internal class LanguageTextDto
|
||||
{
|
||||
[Column("pk")]
|
||||
[PrimaryKeyColumn]
|
||||
public int PrimaryKey { get; set; }
|
||||
|
||||
[Column("languageId")]
|
||||
[ForeignKey(typeof(LanguageDto), Column = "id")]
|
||||
public int LanguageId { get; set; }
|
||||
|
||||
[Column("UniqueId")]
|
||||
[ForeignKey(typeof(DictionaryDto), Column = "id")]
|
||||
public Guid UniqueId { get; set; }
|
||||
|
||||
[Column("value")]
|
||||
[Length(1000)]
|
||||
public string Value { get; set; }
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.Lock)]
|
||||
[PrimaryKey("id")]
|
||||
+37
-37
@@ -1,37 +1,37 @@
|
||||
using System;
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.Log)]
|
||||
[PrimaryKey("id")]
|
||||
[ExplicitColumns]
|
||||
internal class LogDto
|
||||
{
|
||||
[Column("id")]
|
||||
[PrimaryKeyColumn]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column("userId")]
|
||||
public int UserId { get; set; }
|
||||
|
||||
[Column("NodeId")]
|
||||
[Index(IndexTypes.NonClustered, Name = "IX_umbracoLog")]
|
||||
public int NodeId { get; set; }
|
||||
|
||||
[Column("Datestamp")]
|
||||
[Constraint(Default = SystemMethods.CurrentDateTime)]
|
||||
public DateTime Datestamp { get; set; }
|
||||
|
||||
[Column("logHeader")]
|
||||
[Length(50)]
|
||||
public string Header { get; set; }
|
||||
|
||||
[Column("logComment")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[Length(4000)]
|
||||
public string Comment { get; set; }
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.Log)]
|
||||
[PrimaryKey("id")]
|
||||
[ExplicitColumns]
|
||||
internal class LogDto
|
||||
{
|
||||
[Column("id")]
|
||||
[PrimaryKeyColumn]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column("userId")]
|
||||
public int UserId { get; set; }
|
||||
|
||||
[Column("NodeId")]
|
||||
[Index(IndexTypes.NonClustered, Name = "IX_umbracoLog")]
|
||||
public int NodeId { get; set; }
|
||||
|
||||
[Column("Datestamp")]
|
||||
[Constraint(Default = SystemMethods.CurrentDateTime)]
|
||||
public DateTime Datestamp { get; set; }
|
||||
|
||||
[Column("logHeader")]
|
||||
[Length(50)]
|
||||
public string Header { get; set; }
|
||||
|
||||
[Column("logComment")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[Length(4000)]
|
||||
public string Comment { get; set; }
|
||||
}
|
||||
}
|
||||
+70
-70
@@ -1,70 +1,70 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.Macro)]
|
||||
[PrimaryKey("id")]
|
||||
[ExplicitColumns]
|
||||
internal class MacroDto
|
||||
{
|
||||
[Column("id")]
|
||||
[PrimaryKeyColumn]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column("uniqueId")]
|
||||
[Index(IndexTypes.UniqueNonClustered, Name = "IX_cmsMacro_UniqueId")]
|
||||
public Guid UniqueId { get; set; }
|
||||
|
||||
[Column("macroUseInEditor")]
|
||||
[Constraint(Default = "0")]
|
||||
public bool UseInEditor { get; set; }
|
||||
|
||||
[Column("macroRefreshRate")]
|
||||
[Constraint(Default = "0")]
|
||||
public int RefreshRate { get; set; }
|
||||
|
||||
[Column("macroAlias")]
|
||||
[Index(IndexTypes.UniqueNonClustered, Name = "IX_cmsMacroPropertyAlias")]
|
||||
public string Alias { get; set; }
|
||||
|
||||
[Column("macroName")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Column("macroScriptType")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public string ScriptType { get; set; }
|
||||
|
||||
[Column("macroScriptAssembly")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public string ScriptAssembly { get; set; }
|
||||
|
||||
[Column("macroXSLT")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public string Xslt { get; set; }
|
||||
|
||||
[Column("macroCacheByPage")]
|
||||
[Constraint(Default = "1")]
|
||||
public bool CacheByPage { get; set; }
|
||||
|
||||
[Column("macroCachePersonalized")]
|
||||
[Constraint(Default = "0")]
|
||||
public bool CachePersonalized { get; set; }
|
||||
|
||||
[Column("macroDontRender")]
|
||||
[Constraint(Default = "0")]
|
||||
public bool DontRender { get; set; }
|
||||
|
||||
//TODO: Rename this column! - actually please revamp all of the macros! :)
|
||||
[Column("macroPython")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public string MacroFilePath { get; set; }
|
||||
|
||||
[ResultColumn]
|
||||
[Reference(ReferenceType.Many, ReferenceMemberName = "Macro")]
|
||||
public List<MacroPropertyDto> MacroPropertyDtos { get; set; }
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.Macro)]
|
||||
[PrimaryKey("id")]
|
||||
[ExplicitColumns]
|
||||
internal class MacroDto
|
||||
{
|
||||
[Column("id")]
|
||||
[PrimaryKeyColumn]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column("uniqueId")]
|
||||
[Index(IndexTypes.UniqueNonClustered, Name = "IX_cmsMacro_UniqueId")]
|
||||
public Guid UniqueId { get; set; }
|
||||
|
||||
[Column("macroUseInEditor")]
|
||||
[Constraint(Default = "0")]
|
||||
public bool UseInEditor { get; set; }
|
||||
|
||||
[Column("macroRefreshRate")]
|
||||
[Constraint(Default = "0")]
|
||||
public int RefreshRate { get; set; }
|
||||
|
||||
[Column("macroAlias")]
|
||||
[Index(IndexTypes.UniqueNonClustered, Name = "IX_cmsMacroPropertyAlias")]
|
||||
public string Alias { get; set; }
|
||||
|
||||
[Column("macroName")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Column("macroScriptType")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public string ScriptType { get; set; }
|
||||
|
||||
[Column("macroScriptAssembly")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public string ScriptAssembly { get; set; }
|
||||
|
||||
[Column("macroXSLT")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public string Xslt { get; set; }
|
||||
|
||||
[Column("macroCacheByPage")]
|
||||
[Constraint(Default = "1")]
|
||||
public bool CacheByPage { get; set; }
|
||||
|
||||
[Column("macroCachePersonalized")]
|
||||
[Constraint(Default = "0")]
|
||||
public bool CachePersonalized { get; set; }
|
||||
|
||||
[Column("macroDontRender")]
|
||||
[Constraint(Default = "0")]
|
||||
public bool DontRender { get; set; }
|
||||
|
||||
//TODO: Rename this column! - actually please revamp all of the macros! :)
|
||||
[Column("macroPython")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public string MacroFilePath { get; set; }
|
||||
|
||||
[ResultColumn]
|
||||
[Reference(ReferenceType.Many, ReferenceMemberName = "Macro")]
|
||||
public List<MacroPropertyDto> MacroPropertyDtos { get; set; }
|
||||
}
|
||||
}
|
||||
+40
-40
@@ -1,40 +1,40 @@
|
||||
using System;
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.MacroProperty)]
|
||||
[PrimaryKey("id")]
|
||||
[ExplicitColumns]
|
||||
internal class MacroPropertyDto
|
||||
{
|
||||
[Column("id")]
|
||||
[PrimaryKeyColumn]
|
||||
public int Id { get; set; }
|
||||
|
||||
// important to use column name != cmsMacro.uniqueId (fix in v8)
|
||||
[Column("uniquePropertyId")]
|
||||
[Index(IndexTypes.UniqueNonClustered, Name = "IX_cmsMacroProperty_UniquePropertyId")]
|
||||
public Guid UniqueId { get; set; }
|
||||
|
||||
[Column("editorAlias")]
|
||||
public string EditorAlias { get; set; }
|
||||
|
||||
[Column("macro")]
|
||||
[ForeignKey(typeof(MacroDto))]
|
||||
[Index(IndexTypes.UniqueNonClustered, Name = "IX_cmsMacroProperty_Alias", ForColumns = "macro, macroPropertyAlias")]
|
||||
public int Macro { get; set; }
|
||||
|
||||
[Column("macroPropertySortOrder")]
|
||||
[Constraint(Default = "0")]
|
||||
public byte SortOrder { get; set; }
|
||||
|
||||
[Column("macroPropertyAlias")]
|
||||
[Length(50)]
|
||||
public string Alias { get; set; }
|
||||
|
||||
[Column("macroPropertyName")]
|
||||
public string Name { get; set; }
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.MacroProperty)]
|
||||
[PrimaryKey("id")]
|
||||
[ExplicitColumns]
|
||||
internal class MacroPropertyDto
|
||||
{
|
||||
[Column("id")]
|
||||
[PrimaryKeyColumn]
|
||||
public int Id { get; set; }
|
||||
|
||||
// important to use column name != cmsMacro.uniqueId (fix in v8)
|
||||
[Column("uniquePropertyId")]
|
||||
[Index(IndexTypes.UniqueNonClustered, Name = "IX_cmsMacroProperty_UniquePropertyId")]
|
||||
public Guid UniqueId { get; set; }
|
||||
|
||||
[Column("editorAlias")]
|
||||
public string EditorAlias { get; set; }
|
||||
|
||||
[Column("macro")]
|
||||
[ForeignKey(typeof(MacroDto))]
|
||||
[Index(IndexTypes.UniqueNonClustered, Name = "IX_cmsMacroProperty_Alias", ForColumns = "macro, macroPropertyAlias")]
|
||||
public int Macro { get; set; }
|
||||
|
||||
[Column("macroPropertySortOrder")]
|
||||
[Constraint(Default = "0")]
|
||||
public byte SortOrder { get; set; }
|
||||
|
||||
[Column("macroPropertyAlias")]
|
||||
[Length(50)]
|
||||
public string Alias { get; set; }
|
||||
|
||||
[Column("macroPropertyName")]
|
||||
public string Name { get; set; }
|
||||
}
|
||||
}
|
||||
+20
-20
@@ -1,20 +1,20 @@
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.Member2MemberGroup)]
|
||||
[PrimaryKey("Member", AutoIncrement = false)]
|
||||
[ExplicitColumns]
|
||||
internal class Member2MemberGroupDto
|
||||
{
|
||||
[Column("Member")]
|
||||
[PrimaryKeyColumn(AutoIncrement = false, Name = "PK_cmsMember2MemberGroup", OnColumns = "Member, MemberGroup")]
|
||||
[ForeignKey(typeof(MemberDto))]
|
||||
public int Member { get; set; }
|
||||
|
||||
[Column("MemberGroup")]
|
||||
[ForeignKey(typeof(NodeDto))]
|
||||
public int MemberGroup { get; set; }
|
||||
}
|
||||
}
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.Member2MemberGroup)]
|
||||
[PrimaryKey("Member", AutoIncrement = false)]
|
||||
[ExplicitColumns]
|
||||
internal class Member2MemberGroupDto
|
||||
{
|
||||
[Column("Member")]
|
||||
[PrimaryKeyColumn(AutoIncrement = false, Name = "PK_cmsMember2MemberGroup", OnColumns = "Member, MemberGroup")]
|
||||
[ForeignKey(typeof(MemberDto))]
|
||||
public int Member { get; set; }
|
||||
|
||||
[Column("MemberGroup")]
|
||||
[ForeignKey(typeof(NodeDto))]
|
||||
public int MemberGroup { get; set; }
|
||||
}
|
||||
}
|
||||
+42
-42
@@ -1,42 +1,42 @@
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
{
|
||||
[TableName(TableName)]
|
||||
[PrimaryKey("nodeId", AutoIncrement = false)]
|
||||
[ExplicitColumns]
|
||||
internal class MemberDto
|
||||
{
|
||||
private const string TableName = Constants.DatabaseSchema.Tables.Member;
|
||||
|
||||
[Column("nodeId")]
|
||||
[PrimaryKeyColumn(AutoIncrement = false)]
|
||||
[ForeignKey(typeof(ContentDto))]
|
||||
public int NodeId { get; set; }
|
||||
|
||||
[Column("Email")]
|
||||
[Length(1000)]
|
||||
[Constraint(Default = "''")]
|
||||
public string Email { get; set; }
|
||||
|
||||
[Column("LoginName")]
|
||||
[Length(1000)]
|
||||
[Constraint(Default = "''")]
|
||||
[Index(IndexTypes.NonClustered, Name = "IX_cmsMember_LoginName")]
|
||||
public string LoginName { get; set; }
|
||||
|
||||
[Column("Password")]
|
||||
[Length(1000)]
|
||||
[Constraint(Default = "''")]
|
||||
public string Password { get; set; }
|
||||
|
||||
[ResultColumn]
|
||||
[Reference(ReferenceType.OneToOne, ReferenceMemberName = "NodeId")]
|
||||
public ContentDto ContentDto { get; set; }
|
||||
|
||||
[ResultColumn]
|
||||
[Reference(ReferenceType.OneToOne, ReferenceMemberName = "NodeId")]
|
||||
public ContentVersionDto ContentVersionDto { get; set; }
|
||||
}
|
||||
}
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(TableName)]
|
||||
[PrimaryKey("nodeId", AutoIncrement = false)]
|
||||
[ExplicitColumns]
|
||||
internal class MemberDto
|
||||
{
|
||||
private const string TableName = Constants.DatabaseSchema.Tables.Member;
|
||||
|
||||
[Column("nodeId")]
|
||||
[PrimaryKeyColumn(AutoIncrement = false)]
|
||||
[ForeignKey(typeof(ContentDto))]
|
||||
public int NodeId { get; set; }
|
||||
|
||||
[Column("Email")]
|
||||
[Length(1000)]
|
||||
[Constraint(Default = "''")]
|
||||
public string Email { get; set; }
|
||||
|
||||
[Column("LoginName")]
|
||||
[Length(1000)]
|
||||
[Constraint(Default = "''")]
|
||||
[Index(IndexTypes.NonClustered, Name = "IX_cmsMember_LoginName")]
|
||||
public string LoginName { get; set; }
|
||||
|
||||
[Column("Password")]
|
||||
[Length(1000)]
|
||||
[Constraint(Default = "''")]
|
||||
public string Password { get; set; }
|
||||
|
||||
[ResultColumn]
|
||||
[Reference(ReferenceType.OneToOne, ReferenceMemberName = "NodeId")]
|
||||
public ContentDto ContentDto { get; set; }
|
||||
|
||||
[ResultColumn]
|
||||
[Reference(ReferenceType.OneToOne, ReferenceMemberName = "NodeId")]
|
||||
public ContentVersionDto ContentVersionDto { get; set; }
|
||||
}
|
||||
}
|
||||
+31
-31
@@ -1,31 +1,31 @@
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.MemberType)]
|
||||
[PrimaryKey("pk")]
|
||||
[ExplicitColumns]
|
||||
internal class MemberTypeDto
|
||||
{
|
||||
[Column("pk")]
|
||||
[PrimaryKeyColumn]
|
||||
public int PrimaryKey { get; set; }
|
||||
|
||||
[Column("NodeId")]
|
||||
[ForeignKey(typeof(NodeDto))]
|
||||
[ForeignKey(typeof(ContentTypeDto), Column = "nodeId")]
|
||||
public int NodeId { get; set; }
|
||||
|
||||
[Column("propertytypeId")]
|
||||
public int PropertyTypeId { get; set; }
|
||||
|
||||
[Column("memberCanEdit")]
|
||||
[Constraint(Default = "0")]
|
||||
public bool CanEdit { get; set; }
|
||||
|
||||
[Column("viewOnProfile")]
|
||||
[Constraint(Default = "0")]
|
||||
public bool ViewOnProfile { get; set; }
|
||||
}
|
||||
}
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.MemberType)]
|
||||
[PrimaryKey("pk")]
|
||||
[ExplicitColumns]
|
||||
internal class MemberTypeDto
|
||||
{
|
||||
[Column("pk")]
|
||||
[PrimaryKeyColumn]
|
||||
public int PrimaryKey { get; set; }
|
||||
|
||||
[Column("NodeId")]
|
||||
[ForeignKey(typeof(NodeDto))]
|
||||
[ForeignKey(typeof(ContentTypeDto), Column = "nodeId")]
|
||||
public int NodeId { get; set; }
|
||||
|
||||
[Column("propertytypeId")]
|
||||
public int PropertyTypeId { get; set; }
|
||||
|
||||
[Column("memberCanEdit")]
|
||||
[Constraint(Default = "0")]
|
||||
public bool CanEdit { get; set; }
|
||||
|
||||
[Column("viewOnProfile")]
|
||||
[Constraint(Default = "0")]
|
||||
public bool ViewOnProfile { get; set; }
|
||||
}
|
||||
}
|
||||
+80
-80
@@ -1,80 +1,80 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using NPoco;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.Node)]
|
||||
[PrimaryKey("id")]
|
||||
[ExplicitColumns]
|
||||
internal class MemberTypeReadOnlyDto
|
||||
{
|
||||
/* from umbracoNode */
|
||||
[Column("id")]
|
||||
public int NodeId { get; set; }
|
||||
|
||||
[Column("trashed")]
|
||||
public bool Trashed { get; set; }
|
||||
|
||||
[Column("parentID")]
|
||||
public int ParentId { get; set; }
|
||||
|
||||
[Column("nodeUser")]
|
||||
public int? UserId { get; set; }
|
||||
|
||||
[Column("level")]
|
||||
public short Level { get; set; }
|
||||
|
||||
[Column("path")]
|
||||
public string Path { get; set; }
|
||||
|
||||
[Column("sortOrder")]
|
||||
public int SortOrder { get; set; }
|
||||
|
||||
[Column("uniqueID")]
|
||||
public Guid? UniqueId { get; set; }
|
||||
|
||||
[Column("text")]
|
||||
public string Text { get; set; }
|
||||
|
||||
[Column("nodeObjectType")]
|
||||
public Guid? NodeObjectType { get; set; }
|
||||
|
||||
[Column("createDate")]
|
||||
public DateTime CreateDate { get; set; }
|
||||
|
||||
/* cmsContentType */
|
||||
[Column("pk")]
|
||||
public int PrimaryKey { get; set; }
|
||||
|
||||
[Column("alias")]
|
||||
public string Alias { get; set; }
|
||||
|
||||
[Column("icon")]
|
||||
public string Icon { get; set; }
|
||||
|
||||
[Column("thumbnail")]
|
||||
public string Thumbnail { get; set; }
|
||||
|
||||
[Column("description")]
|
||||
public string Description { get; set; }
|
||||
|
||||
[Column("isContainer")]
|
||||
public bool IsContainer { get; set; }
|
||||
|
||||
[Column("allowAtRoot")]
|
||||
public bool AllowAtRoot { get; set; }
|
||||
|
||||
/* PropertyTypes */
|
||||
//TODO Add PropertyTypeDto (+MemberTypeDto and DataTypeDto as one) ReadOnly list
|
||||
[ResultColumn]
|
||||
[Reference(ReferenceType.Many, ReferenceMemberName = "ContentTypeId")]
|
||||
public List<PropertyTypeReadOnlyDto> PropertyTypes { get; set; }
|
||||
|
||||
/* PropertyTypeGroups */
|
||||
//TODO Add PropertyTypeGroupDto ReadOnly list
|
||||
[ResultColumn]
|
||||
[Reference(ReferenceType.Many, ReferenceMemberName = "ContentTypeNodeId")]
|
||||
public List<PropertyTypeGroupReadOnlyDto> PropertyTypeGroups { get; set; }
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using NPoco;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.Node)]
|
||||
[PrimaryKey("id")]
|
||||
[ExplicitColumns]
|
||||
internal class MemberTypeReadOnlyDto
|
||||
{
|
||||
/* from umbracoNode */
|
||||
[Column("id")]
|
||||
public int NodeId { get; set; }
|
||||
|
||||
[Column("trashed")]
|
||||
public bool Trashed { get; set; }
|
||||
|
||||
[Column("parentID")]
|
||||
public int ParentId { get; set; }
|
||||
|
||||
[Column("nodeUser")]
|
||||
public int? UserId { get; set; }
|
||||
|
||||
[Column("level")]
|
||||
public short Level { get; set; }
|
||||
|
||||
[Column("path")]
|
||||
public string Path { get; set; }
|
||||
|
||||
[Column("sortOrder")]
|
||||
public int SortOrder { get; set; }
|
||||
|
||||
[Column("uniqueID")]
|
||||
public Guid? UniqueId { get; set; }
|
||||
|
||||
[Column("text")]
|
||||
public string Text { get; set; }
|
||||
|
||||
[Column("nodeObjectType")]
|
||||
public Guid? NodeObjectType { get; set; }
|
||||
|
||||
[Column("createDate")]
|
||||
public DateTime CreateDate { get; set; }
|
||||
|
||||
/* cmsContentType */
|
||||
[Column("pk")]
|
||||
public int PrimaryKey { get; set; }
|
||||
|
||||
[Column("alias")]
|
||||
public string Alias { get; set; }
|
||||
|
||||
[Column("icon")]
|
||||
public string Icon { get; set; }
|
||||
|
||||
[Column("thumbnail")]
|
||||
public string Thumbnail { get; set; }
|
||||
|
||||
[Column("description")]
|
||||
public string Description { get; set; }
|
||||
|
||||
[Column("isContainer")]
|
||||
public bool IsContainer { get; set; }
|
||||
|
||||
[Column("allowAtRoot")]
|
||||
public bool AllowAtRoot { get; set; }
|
||||
|
||||
/* PropertyTypes */
|
||||
//TODO Add PropertyTypeDto (+MemberTypeDto and DataTypeDto as one) ReadOnly list
|
||||
[ResultColumn]
|
||||
[Reference(ReferenceType.Many, ReferenceMemberName = "ContentTypeId")]
|
||||
public List<PropertyTypeReadOnlyDto> PropertyTypes { get; set; }
|
||||
|
||||
/* PropertyTypeGroups */
|
||||
//TODO Add PropertyTypeGroupDto ReadOnly list
|
||||
[ResultColumn]
|
||||
[Reference(ReferenceType.Many, ReferenceMemberName = "ContentTypeNodeId")]
|
||||
public List<PropertyTypeGroupReadOnlyDto> PropertyTypeGroups { get; set; }
|
||||
}
|
||||
}
|
||||
+64
-64
@@ -1,64 +1,64 @@
|
||||
using System;
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
{
|
||||
[TableName(TableName)]
|
||||
[PrimaryKey("id")]
|
||||
[ExplicitColumns]
|
||||
internal class NodeDto
|
||||
{
|
||||
private const string TableName = Constants.DatabaseSchema.Tables.Node;
|
||||
public const int NodeIdSeed = 1060;
|
||||
|
||||
[Column("id")]
|
||||
[PrimaryKeyColumn(IdentitySeed = NodeIdSeed)]
|
||||
public int NodeId { get; set; }
|
||||
|
||||
[Column("uniqueId")]
|
||||
[NullSetting(NullSetting = NullSettings.NotNull)]
|
||||
[Index(IndexTypes.UniqueNonClustered, Name = "IX_" + TableName + "_UniqueId")]
|
||||
[Constraint(Default = SystemMethods.NewGuid)]
|
||||
public Guid UniqueId { get; set; }
|
||||
|
||||
[Column("parentId")]
|
||||
[ForeignKey(typeof(NodeDto))]
|
||||
[Index(IndexTypes.NonClustered, Name = "IX_" + TableName + "_ParentId")]
|
||||
public int ParentId { get; set; }
|
||||
|
||||
[Column("level")]
|
||||
public short Level { get; set; }
|
||||
|
||||
[Column("path")]
|
||||
[Length(150)]
|
||||
[Index(IndexTypes.NonClustered, Name = "IX_" + TableName + "_Path")]
|
||||
public string Path { get; set; }
|
||||
|
||||
[Column("sortOrder")]
|
||||
public int SortOrder { get; set; }
|
||||
|
||||
[Column("trashed")]
|
||||
[Constraint(Default = "0")]
|
||||
[Index(IndexTypes.NonClustered, Name = "IX_" + TableName + "_Trashed")]
|
||||
public bool Trashed { get; set; }
|
||||
|
||||
[Column("nodeUser")] // fixme dbfix rename userId
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public int? UserId { get; set; }
|
||||
|
||||
[Column("text")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public string Text { get; set; }
|
||||
|
||||
[Column("nodeObjectType")] // fixme dbfix rename objectType
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[Index(IndexTypes.NonClustered, Name = "IX_" + TableName + "_ObjectType")]
|
||||
public Guid? NodeObjectType { get; set; } // fixme dbfix rename ObjectType
|
||||
|
||||
[Column("createDate")]
|
||||
[Constraint(Default = SystemMethods.CurrentDateTime)]
|
||||
public DateTime CreateDate { get; set; }
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(TableName)]
|
||||
[PrimaryKey("id")]
|
||||
[ExplicitColumns]
|
||||
internal class NodeDto
|
||||
{
|
||||
private const string TableName = Constants.DatabaseSchema.Tables.Node;
|
||||
public const int NodeIdSeed = 1060;
|
||||
|
||||
[Column("id")]
|
||||
[PrimaryKeyColumn(IdentitySeed = NodeIdSeed)]
|
||||
public int NodeId { get; set; }
|
||||
|
||||
[Column("uniqueId")]
|
||||
[NullSetting(NullSetting = NullSettings.NotNull)]
|
||||
[Index(IndexTypes.UniqueNonClustered, Name = "IX_" + TableName + "_UniqueId")]
|
||||
[Constraint(Default = SystemMethods.NewGuid)]
|
||||
public Guid UniqueId { get; set; }
|
||||
|
||||
[Column("parentId")]
|
||||
[ForeignKey(typeof(NodeDto))]
|
||||
[Index(IndexTypes.NonClustered, Name = "IX_" + TableName + "_ParentId")]
|
||||
public int ParentId { get; set; }
|
||||
|
||||
[Column("level")]
|
||||
public short Level { get; set; }
|
||||
|
||||
[Column("path")]
|
||||
[Length(150)]
|
||||
[Index(IndexTypes.NonClustered, Name = "IX_" + TableName + "_Path")]
|
||||
public string Path { get; set; }
|
||||
|
||||
[Column("sortOrder")]
|
||||
public int SortOrder { get; set; }
|
||||
|
||||
[Column("trashed")]
|
||||
[Constraint(Default = "0")]
|
||||
[Index(IndexTypes.NonClustered, Name = "IX_" + TableName + "_Trashed")]
|
||||
public bool Trashed { get; set; }
|
||||
|
||||
[Column("nodeUser")] // fixme dbfix rename userId
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public int? UserId { get; set; }
|
||||
|
||||
[Column("text")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public string Text { get; set; }
|
||||
|
||||
[Column("nodeObjectType")] // fixme dbfix rename objectType
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[Index(IndexTypes.NonClustered, Name = "IX_" + TableName + "_ObjectType")]
|
||||
public Guid? NodeObjectType { get; set; } // fixme dbfix rename ObjectType
|
||||
|
||||
[Column("createDate")]
|
||||
[Constraint(Default = SystemMethods.CurrentDateTime)]
|
||||
public DateTime CreateDate { get; set; }
|
||||
}
|
||||
}
|
||||
+23
-23
@@ -1,23 +1,23 @@
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.NodePreviewXml)]
|
||||
[PrimaryKey("nodeId", AutoIncrement = false)]
|
||||
[ExplicitColumns]
|
||||
internal class PreviewXmlDto
|
||||
{
|
||||
[Column("nodeId")]
|
||||
[PrimaryKeyColumn(AutoIncrement = false)]
|
||||
[ForeignKey(typeof(ContentDto), Column = "nodeId")]
|
||||
public int NodeId { get; set; }
|
||||
|
||||
[Column("xml")]
|
||||
[SpecialDbType(SpecialDbTypes.NTEXT)]
|
||||
public string Xml { get; set; }
|
||||
|
||||
[Column("rv")]
|
||||
public long Rv { get; set; }
|
||||
}
|
||||
}
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.NodePreviewXml)]
|
||||
[PrimaryKey("nodeId", AutoIncrement = false)]
|
||||
[ExplicitColumns]
|
||||
internal class PreviewXmlDto
|
||||
{
|
||||
[Column("nodeId")]
|
||||
[PrimaryKeyColumn(AutoIncrement = false)]
|
||||
[ForeignKey(typeof(ContentDto), Column = "nodeId")]
|
||||
public int NodeId { get; set; }
|
||||
|
||||
[Column("xml")]
|
||||
[SpecialDbType(SpecialDbTypes.NTEXT)]
|
||||
public string Xml { get; set; }
|
||||
|
||||
[Column("rv")]
|
||||
public long Rv { get; set; }
|
||||
}
|
||||
}
|
||||
+135
-135
@@ -1,135 +1,135 @@
|
||||
using System;
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
{
|
||||
[TableName(TableName)]
|
||||
[PrimaryKey("id")]
|
||||
[ExplicitColumns]
|
||||
internal class PropertyDataDto
|
||||
{
|
||||
private const string TableName = Constants.DatabaseSchema.Tables.PropertyData;
|
||||
public const int VarcharLength = 512;
|
||||
public const int SegmentLength = 256;
|
||||
|
||||
private decimal? _decimalValue;
|
||||
|
||||
// pk, not used at the moment (never updating)
|
||||
[Column("id")]
|
||||
[PrimaryKeyColumn]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column("versionId")]
|
||||
[ForeignKey(typeof(ContentVersionDto))]
|
||||
[Index(IndexTypes.UniqueNonClustered, Name = "IX_" + TableName + "_VersionId", ForColumns = "versionId,propertyTypeId,languageId,segment")]
|
||||
public int VersionId { get; set; }
|
||||
|
||||
[Column("propertyTypeId")]
|
||||
[ForeignKey(typeof(PropertyTypeDto))]
|
||||
[Index(IndexTypes.NonClustered, Name = "IX_" + TableName + "_PropertyTypeId")]
|
||||
public int PropertyTypeId { get; set; }
|
||||
|
||||
[Column("languageId")]
|
||||
[ForeignKey(typeof(LanguageDto))]
|
||||
[Index(IndexTypes.NonClustered, Name = "IX_" + TableName + "_LanguageId")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public int? LanguageId { get; set; }
|
||||
|
||||
[Column("segment")]
|
||||
[Index(IndexTypes.NonClustered, Name = "IX_" + TableName + "_Segment")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[Length(SegmentLength)]
|
||||
public string Segment { get; set; }
|
||||
|
||||
[Column("intValue")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public int? IntegerValue { get; set; }
|
||||
|
||||
[Column("decimalValue")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public decimal? DecimalValue
|
||||
{
|
||||
get => _decimalValue;
|
||||
set => _decimalValue = value?.Normalize();
|
||||
}
|
||||
|
||||
[Column("dateValue")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public DateTime? DateValue { get; set; }
|
||||
|
||||
[Column("varcharValue")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[Length(VarcharLength)]
|
||||
public string VarcharValue { get; set; }
|
||||
|
||||
[Column("textValue")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[SpecialDbType(SpecialDbTypes.NTEXT)]
|
||||
public string TextValue { get; set; }
|
||||
|
||||
[ResultColumn]
|
||||
[Reference(ReferenceType.OneToOne, ColumnName = "PropertyTypeId")]
|
||||
public PropertyTypeDto PropertyTypeDto { get; set; }
|
||||
|
||||
[Ignore]
|
||||
public object Value
|
||||
{
|
||||
get
|
||||
{
|
||||
if (IntegerValue.HasValue)
|
||||
return IntegerValue.Value;
|
||||
|
||||
if (DecimalValue.HasValue)
|
||||
return DecimalValue.Value;
|
||||
|
||||
if (DateValue.HasValue)
|
||||
return DateValue.Value;
|
||||
|
||||
if (!string.IsNullOrEmpty(VarcharValue))
|
||||
return VarcharValue;
|
||||
|
||||
if (!string.IsNullOrEmpty(TextValue))
|
||||
return TextValue;
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public PropertyDataDto Clone(int versionId)
|
||||
{
|
||||
return new PropertyDataDto
|
||||
{
|
||||
VersionId = versionId,
|
||||
PropertyTypeId = PropertyTypeId,
|
||||
LanguageId = LanguageId,
|
||||
Segment = Segment,
|
||||
IntegerValue = IntegerValue,
|
||||
DecimalValue = DecimalValue,
|
||||
DateValue = DateValue,
|
||||
VarcharValue = VarcharValue,
|
||||
TextValue = TextValue,
|
||||
PropertyTypeDto = PropertyTypeDto
|
||||
};
|
||||
}
|
||||
|
||||
protected bool Equals(PropertyDataDto other)
|
||||
{
|
||||
return Id == other.Id;
|
||||
}
|
||||
|
||||
public override bool Equals(object other)
|
||||
{
|
||||
return
|
||||
!ReferenceEquals(null, other) // other is not null
|
||||
&& (ReferenceEquals(this, other) // and either ref-equals, or same id
|
||||
|| other is PropertyDataDto pdata && pdata.Id == Id);
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
// ReSharper disable once NonReadonlyMemberInGetHashCode
|
||||
return Id;
|
||||
}
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(TableName)]
|
||||
[PrimaryKey("id")]
|
||||
[ExplicitColumns]
|
||||
internal class PropertyDataDto
|
||||
{
|
||||
private const string TableName = Constants.DatabaseSchema.Tables.PropertyData;
|
||||
public const int VarcharLength = 512;
|
||||
public const int SegmentLength = 256;
|
||||
|
||||
private decimal? _decimalValue;
|
||||
|
||||
// pk, not used at the moment (never updating)
|
||||
[Column("id")]
|
||||
[PrimaryKeyColumn]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column("versionId")]
|
||||
[ForeignKey(typeof(ContentVersionDto))]
|
||||
[Index(IndexTypes.UniqueNonClustered, Name = "IX_" + TableName + "_VersionId", ForColumns = "versionId,propertyTypeId,languageId,segment")]
|
||||
public int VersionId { get; set; }
|
||||
|
||||
[Column("propertyTypeId")]
|
||||
[ForeignKey(typeof(PropertyTypeDto))]
|
||||
[Index(IndexTypes.NonClustered, Name = "IX_" + TableName + "_PropertyTypeId")]
|
||||
public int PropertyTypeId { get; set; }
|
||||
|
||||
[Column("languageId")]
|
||||
[ForeignKey(typeof(LanguageDto))]
|
||||
[Index(IndexTypes.NonClustered, Name = "IX_" + TableName + "_LanguageId")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public int? LanguageId { get; set; }
|
||||
|
||||
[Column("segment")]
|
||||
[Index(IndexTypes.NonClustered, Name = "IX_" + TableName + "_Segment")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[Length(SegmentLength)]
|
||||
public string Segment { get; set; }
|
||||
|
||||
[Column("intValue")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public int? IntegerValue { get; set; }
|
||||
|
||||
[Column("decimalValue")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public decimal? DecimalValue
|
||||
{
|
||||
get => _decimalValue;
|
||||
set => _decimalValue = value?.Normalize();
|
||||
}
|
||||
|
||||
[Column("dateValue")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public DateTime? DateValue { get; set; }
|
||||
|
||||
[Column("varcharValue")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[Length(VarcharLength)]
|
||||
public string VarcharValue { get; set; }
|
||||
|
||||
[Column("textValue")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[SpecialDbType(SpecialDbTypes.NTEXT)]
|
||||
public string TextValue { get; set; }
|
||||
|
||||
[ResultColumn]
|
||||
[Reference(ReferenceType.OneToOne, ColumnName = "PropertyTypeId")]
|
||||
public PropertyTypeDto PropertyTypeDto { get; set; }
|
||||
|
||||
[Ignore]
|
||||
public object Value
|
||||
{
|
||||
get
|
||||
{
|
||||
if (IntegerValue.HasValue)
|
||||
return IntegerValue.Value;
|
||||
|
||||
if (DecimalValue.HasValue)
|
||||
return DecimalValue.Value;
|
||||
|
||||
if (DateValue.HasValue)
|
||||
return DateValue.Value;
|
||||
|
||||
if (!string.IsNullOrEmpty(VarcharValue))
|
||||
return VarcharValue;
|
||||
|
||||
if (!string.IsNullOrEmpty(TextValue))
|
||||
return TextValue;
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public PropertyDataDto Clone(int versionId)
|
||||
{
|
||||
return new PropertyDataDto
|
||||
{
|
||||
VersionId = versionId,
|
||||
PropertyTypeId = PropertyTypeId,
|
||||
LanguageId = LanguageId,
|
||||
Segment = Segment,
|
||||
IntegerValue = IntegerValue,
|
||||
DecimalValue = DecimalValue,
|
||||
DateValue = DateValue,
|
||||
VarcharValue = VarcharValue,
|
||||
TextValue = TextValue,
|
||||
PropertyTypeDto = PropertyTypeDto
|
||||
};
|
||||
}
|
||||
|
||||
protected bool Equals(PropertyDataDto other)
|
||||
{
|
||||
return Id == other.Id;
|
||||
}
|
||||
|
||||
public override bool Equals(object other)
|
||||
{
|
||||
return
|
||||
!ReferenceEquals(null, other) // other is not null
|
||||
&& (ReferenceEquals(this, other) // and either ref-equals, or same id
|
||||
|| other is PropertyDataDto pdata && pdata.Id == Id);
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
// ReSharper disable once NonReadonlyMemberInGetHashCode
|
||||
return Id;
|
||||
}
|
||||
}
|
||||
}
|
||||
+68
-68
@@ -1,68 +1,68 @@
|
||||
using System;
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.PropertyType)]
|
||||
[PrimaryKey("id")]
|
||||
[ExplicitColumns]
|
||||
internal class PropertyTypeDto
|
||||
{
|
||||
[Column("id")]
|
||||
[PrimaryKeyColumn(IdentitySeed = 50)]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column("dataTypeId")]
|
||||
[ForeignKey(typeof(DataTypeDto), Column = "nodeId")]
|
||||
public int DataTypeId { get; set; }
|
||||
|
||||
[Column("contentTypeId")]
|
||||
[ForeignKey(typeof(ContentTypeDto), Column = "nodeId")]
|
||||
public int ContentTypeId { get; set; }
|
||||
|
||||
[Column("propertyTypeGroupId")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[ForeignKey(typeof(PropertyTypeGroupDto))]
|
||||
public int? PropertyTypeGroupId { get; set; }
|
||||
|
||||
[Column("Alias")]
|
||||
public string Alias { get; set; }
|
||||
|
||||
[Column("Name")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Column("sortOrder")]
|
||||
[Constraint(Default = "0")]
|
||||
public int SortOrder { get; set; }
|
||||
|
||||
[Column("mandatory")]
|
||||
[Constraint(Default = "0")]
|
||||
public bool Mandatory { get; set; }
|
||||
|
||||
[Column("validationRegExp")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public string ValidationRegExp { get; set; }
|
||||
|
||||
[Column("Description")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[Length(2000)]
|
||||
public string Description { get; set; }
|
||||
|
||||
[Column("variations")]
|
||||
[Constraint(Default = "1" /*ContentVariation.InvariantNeutral*/)]
|
||||
public byte Variations { get; set; }
|
||||
|
||||
[ResultColumn]
|
||||
[Reference(ReferenceType.OneToOne, ColumnName = "DataTypeId")]
|
||||
public DataTypeDto DataTypeDto { get; set; }
|
||||
|
||||
[Column("UniqueID")]
|
||||
[NullSetting(NullSetting = NullSettings.NotNull)]
|
||||
[Constraint(Default = SystemMethods.NewGuid)]
|
||||
[Index(IndexTypes.UniqueNonClustered, Name = "IX_cmsPropertyTypeUniqueID")]
|
||||
public Guid UniqueId { get; set; }
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.PropertyType)]
|
||||
[PrimaryKey("id")]
|
||||
[ExplicitColumns]
|
||||
internal class PropertyTypeDto
|
||||
{
|
||||
[Column("id")]
|
||||
[PrimaryKeyColumn(IdentitySeed = 50)]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column("dataTypeId")]
|
||||
[ForeignKey(typeof(DataTypeDto), Column = "nodeId")]
|
||||
public int DataTypeId { get; set; }
|
||||
|
||||
[Column("contentTypeId")]
|
||||
[ForeignKey(typeof(ContentTypeDto), Column = "nodeId")]
|
||||
public int ContentTypeId { get; set; }
|
||||
|
||||
[Column("propertyTypeGroupId")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[ForeignKey(typeof(PropertyTypeGroupDto))]
|
||||
public int? PropertyTypeGroupId { get; set; }
|
||||
|
||||
[Column("Alias")]
|
||||
public string Alias { get; set; }
|
||||
|
||||
[Column("Name")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Column("sortOrder")]
|
||||
[Constraint(Default = "0")]
|
||||
public int SortOrder { get; set; }
|
||||
|
||||
[Column("mandatory")]
|
||||
[Constraint(Default = "0")]
|
||||
public bool Mandatory { get; set; }
|
||||
|
||||
[Column("validationRegExp")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public string ValidationRegExp { get; set; }
|
||||
|
||||
[Column("Description")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[Length(2000)]
|
||||
public string Description { get; set; }
|
||||
|
||||
[Column("variations")]
|
||||
[Constraint(Default = "1" /*ContentVariation.InvariantNeutral*/)]
|
||||
public byte Variations { get; set; }
|
||||
|
||||
[ResultColumn]
|
||||
[Reference(ReferenceType.OneToOne, ColumnName = "DataTypeId")]
|
||||
public DataTypeDto DataTypeDto { get; set; }
|
||||
|
||||
[Column("UniqueID")]
|
||||
[NullSetting(NullSetting = NullSettings.NotNull)]
|
||||
[Constraint(Default = SystemMethods.NewGuid)]
|
||||
[Index(IndexTypes.UniqueNonClustered, Name = "IX_cmsPropertyTypeUniqueID")]
|
||||
public Guid UniqueId { get; set; }
|
||||
}
|
||||
}
|
||||
+38
-38
@@ -1,38 +1,38 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.PropertyTypeGroup)]
|
||||
[PrimaryKey("id", AutoIncrement = true)]
|
||||
[ExplicitColumns]
|
||||
internal class PropertyTypeGroupDto
|
||||
{
|
||||
[Column("id")]
|
||||
[PrimaryKeyColumn(IdentitySeed = 12)]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column("contenttypeNodeId")]
|
||||
[ForeignKey(typeof(ContentTypeDto), Column = "nodeId")]
|
||||
public int ContentTypeNodeId { get; set; }
|
||||
|
||||
[Column("text")]
|
||||
public string Text { get; set; }
|
||||
|
||||
[Column("sortorder")]
|
||||
public int SortOrder { get; set; }
|
||||
|
||||
[ResultColumn]
|
||||
[Reference(ReferenceType.Many, ReferenceMemberName = "PropertyTypeGroupId")]
|
||||
public List<PropertyTypeDto> PropertyTypeDtos { get; set; }
|
||||
|
||||
[Column("uniqueID")]
|
||||
[NullSetting(NullSetting = NullSettings.NotNull)]
|
||||
[Constraint(Default = SystemMethods.NewGuid)]
|
||||
[Index(IndexTypes.UniqueNonClustered, Name = "IX_cmsPropertyTypeGroupUniqueID")]
|
||||
public Guid UniqueId { get; set; }
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.PropertyTypeGroup)]
|
||||
[PrimaryKey("id", AutoIncrement = true)]
|
||||
[ExplicitColumns]
|
||||
internal class PropertyTypeGroupDto
|
||||
{
|
||||
[Column("id")]
|
||||
[PrimaryKeyColumn(IdentitySeed = 12)]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column("contenttypeNodeId")]
|
||||
[ForeignKey(typeof(ContentTypeDto), Column = "nodeId")]
|
||||
public int ContentTypeNodeId { get; set; }
|
||||
|
||||
[Column("text")]
|
||||
public string Text { get; set; }
|
||||
|
||||
[Column("sortorder")]
|
||||
public int SortOrder { get; set; }
|
||||
|
||||
[ResultColumn]
|
||||
[Reference(ReferenceType.Many, ReferenceMemberName = "PropertyTypeGroupId")]
|
||||
public List<PropertyTypeDto> PropertyTypeDtos { get; set; }
|
||||
|
||||
[Column("uniqueID")]
|
||||
[NullSetting(NullSetting = NullSettings.NotNull)]
|
||||
[Constraint(Default = SystemMethods.NewGuid)]
|
||||
[Index(IndexTypes.UniqueNonClustered, Name = "IX_cmsPropertyTypeGroupUniqueID")]
|
||||
public Guid UniqueId { get; set; }
|
||||
}
|
||||
}
|
||||
+26
-26
@@ -1,26 +1,26 @@
|
||||
using System;
|
||||
using NPoco;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.PropertyTypeGroup)]
|
||||
[PrimaryKey("id", AutoIncrement = true)]
|
||||
[ExplicitColumns]
|
||||
internal class PropertyTypeGroupReadOnlyDto
|
||||
{
|
||||
[Column("PropertyTypeGroupId")]
|
||||
public int? Id { get; set; }
|
||||
|
||||
[Column("PropertyGroupName")]
|
||||
public string Text { get; set; }
|
||||
|
||||
[Column("PropertyGroupSortOrder")]
|
||||
public int SortOrder { get; set; }
|
||||
|
||||
[Column("contenttypeNodeId")]
|
||||
public int ContentTypeNodeId { get; set; }
|
||||
|
||||
[Column("PropertyGroupUniqueID")]
|
||||
public Guid UniqueId { get; set; }
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using NPoco;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.PropertyTypeGroup)]
|
||||
[PrimaryKey("id", AutoIncrement = true)]
|
||||
[ExplicitColumns]
|
||||
internal class PropertyTypeGroupReadOnlyDto
|
||||
{
|
||||
[Column("PropertyTypeGroupId")]
|
||||
public int? Id { get; set; }
|
||||
|
||||
[Column("PropertyGroupName")]
|
||||
public string Text { get; set; }
|
||||
|
||||
[Column("PropertyGroupSortOrder")]
|
||||
public int SortOrder { get; set; }
|
||||
|
||||
[Column("contenttypeNodeId")]
|
||||
public int ContentTypeNodeId { get; set; }
|
||||
|
||||
[Column("PropertyGroupUniqueID")]
|
||||
public Guid UniqueId { get; set; }
|
||||
}
|
||||
}
|
||||
+58
-58
@@ -1,58 +1,58 @@
|
||||
using System;
|
||||
using NPoco;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.PropertyType)]
|
||||
[PrimaryKey("id")]
|
||||
[ExplicitColumns]
|
||||
internal class PropertyTypeReadOnlyDto
|
||||
{
|
||||
[Column("PropertyTypeId")]
|
||||
public int? Id { get; set; }
|
||||
|
||||
[Column("dataTypeId")]
|
||||
public int DataTypeId { get; set; }
|
||||
|
||||
[Column("contentTypeId")]
|
||||
public int ContentTypeId { get; set; }
|
||||
|
||||
[Column("PropertyTypesGroupId")]
|
||||
public int? PropertyTypeGroupId { get; set; }
|
||||
|
||||
[Column("Alias")]
|
||||
public string Alias { get; set; }
|
||||
|
||||
[Column("Name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Column("PropertyTypeSortOrder")]
|
||||
public int SortOrder { get; set; }
|
||||
|
||||
[Column("mandatory")]
|
||||
public bool Mandatory { get; set; }
|
||||
|
||||
[Column("validationRegExp")]
|
||||
public string ValidationRegExp { get; set; }
|
||||
|
||||
[Column("Description")]
|
||||
public string Description { get; set; }
|
||||
|
||||
/* cmsMemberType */
|
||||
[Column("memberCanEdit")]
|
||||
public bool CanEdit { get; set; }
|
||||
|
||||
[Column("viewOnProfile")]
|
||||
public bool ViewOnProfile { get; set; }
|
||||
|
||||
/* cmsDataType */
|
||||
[Column("propertyEditorAlias")]
|
||||
public string PropertyEditorAlias { get; set; }
|
||||
|
||||
[Column("dbType")]
|
||||
public string DbType { get; set; }
|
||||
|
||||
[Column("UniqueID")]
|
||||
public Guid UniqueId { get; set; }
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using NPoco;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.PropertyType)]
|
||||
[PrimaryKey("id")]
|
||||
[ExplicitColumns]
|
||||
internal class PropertyTypeReadOnlyDto
|
||||
{
|
||||
[Column("PropertyTypeId")]
|
||||
public int? Id { get; set; }
|
||||
|
||||
[Column("dataTypeId")]
|
||||
public int DataTypeId { get; set; }
|
||||
|
||||
[Column("contentTypeId")]
|
||||
public int ContentTypeId { get; set; }
|
||||
|
||||
[Column("PropertyTypesGroupId")]
|
||||
public int? PropertyTypeGroupId { get; set; }
|
||||
|
||||
[Column("Alias")]
|
||||
public string Alias { get; set; }
|
||||
|
||||
[Column("Name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Column("PropertyTypeSortOrder")]
|
||||
public int SortOrder { get; set; }
|
||||
|
||||
[Column("mandatory")]
|
||||
public bool Mandatory { get; set; }
|
||||
|
||||
[Column("validationRegExp")]
|
||||
public string ValidationRegExp { get; set; }
|
||||
|
||||
[Column("Description")]
|
||||
public string Description { get; set; }
|
||||
|
||||
/* cmsMemberType */
|
||||
[Column("memberCanEdit")]
|
||||
public bool CanEdit { get; set; }
|
||||
|
||||
[Column("viewOnProfile")]
|
||||
public bool ViewOnProfile { get; set; }
|
||||
|
||||
/* cmsDataType */
|
||||
[Column("propertyEditorAlias")]
|
||||
public string PropertyEditorAlias { get; set; }
|
||||
|
||||
[Column("dbType")]
|
||||
public string DbType { get; set; }
|
||||
|
||||
[Column("UniqueID")]
|
||||
public Guid UniqueId { get; set; }
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.RedirectUrl)]
|
||||
[PrimaryKey("id", AutoIncrement = false)]
|
||||
+38
-38
@@ -1,38 +1,38 @@
|
||||
using System;
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.Relation)]
|
||||
[PrimaryKey("id")]
|
||||
[ExplicitColumns]
|
||||
internal class RelationDto
|
||||
{
|
||||
[Column("id")]
|
||||
[PrimaryKeyColumn]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column("parentId")]
|
||||
[ForeignKey(typeof(NodeDto), Name = "FK_umbracoRelation_umbracoNode")]
|
||||
[Index(IndexTypes.UniqueNonClustered, Name = "IX_umbracoRelation_parentChildType", ForColumns = "parentId,childId,relType")]
|
||||
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 = SystemMethods.CurrentDateTime)]
|
||||
public DateTime Datetime { get; set; }
|
||||
|
||||
[Column("comment")]
|
||||
[Length(1000)]
|
||||
public string Comment { get; set; }
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.Relation)]
|
||||
[PrimaryKey("id")]
|
||||
[ExplicitColumns]
|
||||
internal class RelationDto
|
||||
{
|
||||
[Column("id")]
|
||||
[PrimaryKeyColumn]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column("parentId")]
|
||||
[ForeignKey(typeof(NodeDto), Name = "FK_umbracoRelation_umbracoNode")]
|
||||
[Index(IndexTypes.UniqueNonClustered, Name = "IX_umbracoRelation_parentChildType", ForColumns = "parentId,childId,relType")]
|
||||
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 = SystemMethods.CurrentDateTime)]
|
||||
public DateTime Datetime { get; set; }
|
||||
|
||||
[Column("comment")]
|
||||
[Length(1000)]
|
||||
public string Comment { get; set; }
|
||||
}
|
||||
}
|
||||
+41
-41
@@ -1,41 +1,41 @@
|
||||
using System;
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.RelationType)]
|
||||
[PrimaryKey("id")]
|
||||
[ExplicitColumns]
|
||||
internal class RelationTypeDto
|
||||
{
|
||||
public const int NodeIdSeed = 3;
|
||||
|
||||
[Column("id")]
|
||||
[PrimaryKeyColumn(IdentitySeed = NodeIdSeed)]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column("typeUniqueId")]
|
||||
[Index(IndexTypes.UniqueNonClustered, Name = "IX_umbracoRelationType_UniqueId")]
|
||||
public Guid UniqueId { get; set; }
|
||||
|
||||
[Column("dual")]
|
||||
public bool Dual { get; set; }
|
||||
|
||||
[Column("parentObjectType")]
|
||||
public Guid ParentObjectType { get; set; }
|
||||
|
||||
[Column("childObjectType")]
|
||||
public Guid ChildObjectType { get; set; }
|
||||
|
||||
[Column("name")]
|
||||
[Index(IndexTypes.UniqueNonClustered, Name = "IX_umbracoRelationType_name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Column("alias")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[Length(100)]
|
||||
[Index(IndexTypes.UniqueNonClustered, Name = "IX_umbracoRelationType_alias")]
|
||||
public string Alias { get; set; }
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.RelationType)]
|
||||
[PrimaryKey("id")]
|
||||
[ExplicitColumns]
|
||||
internal class RelationTypeDto
|
||||
{
|
||||
public const int NodeIdSeed = 3;
|
||||
|
||||
[Column("id")]
|
||||
[PrimaryKeyColumn(IdentitySeed = NodeIdSeed)]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column("typeUniqueId")]
|
||||
[Index(IndexTypes.UniqueNonClustered, Name = "IX_umbracoRelationType_UniqueId")]
|
||||
public Guid UniqueId { get; set; }
|
||||
|
||||
[Column("dual")]
|
||||
public bool Dual { get; set; }
|
||||
|
||||
[Column("parentObjectType")]
|
||||
public Guid ParentObjectType { get; set; }
|
||||
|
||||
[Column("childObjectType")]
|
||||
public Guid ChildObjectType { get; set; }
|
||||
|
||||
[Column("name")]
|
||||
[Index(IndexTypes.UniqueNonClustered, Name = "IX_umbracoRelationType_name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Column("alias")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[Length(100)]
|
||||
[Index(IndexTypes.UniqueNonClustered, Name = "IX_umbracoRelationType_alias")]
|
||||
public string Alias { get; set; }
|
||||
}
|
||||
}
|
||||
+40
-40
@@ -1,40 +1,40 @@
|
||||
using System;
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.Server)]
|
||||
[PrimaryKey("id")]
|
||||
[ExplicitColumns]
|
||||
internal class ServerRegistrationDto
|
||||
{
|
||||
[Column("id")]
|
||||
[PrimaryKeyColumn(AutoIncrement = true)]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column("address")]
|
||||
[Length(500)]
|
||||
public string ServerAddress { get; set; }
|
||||
|
||||
[Column("computerName")]
|
||||
[Length(255)]
|
||||
[Index(IndexTypes.UniqueNonClustered, Name = "IX_computerName")] // server identity is unique
|
||||
public string ServerIdentity { get; set; }
|
||||
|
||||
[Column("registeredDate")]
|
||||
[Constraint(Default = SystemMethods.CurrentDateTime)]
|
||||
public DateTime DateRegistered { get; set; }
|
||||
|
||||
[Column("lastNotifiedDate")]
|
||||
public DateTime DateAccessed { get; set; }
|
||||
|
||||
[Column("isActive")]
|
||||
[Index(IndexTypes.NonClustered)]
|
||||
public bool IsActive { get; set; }
|
||||
|
||||
[Column("isMaster")]
|
||||
public bool IsMaster { get; set; }
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.Server)]
|
||||
[PrimaryKey("id")]
|
||||
[ExplicitColumns]
|
||||
internal class ServerRegistrationDto
|
||||
{
|
||||
[Column("id")]
|
||||
[PrimaryKeyColumn(AutoIncrement = true)]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column("address")]
|
||||
[Length(500)]
|
||||
public string ServerAddress { get; set; }
|
||||
|
||||
[Column("computerName")]
|
||||
[Length(255)]
|
||||
[Index(IndexTypes.UniqueNonClustered, Name = "IX_computerName")] // server identity is unique
|
||||
public string ServerIdentity { get; set; }
|
||||
|
||||
[Column("registeredDate")]
|
||||
[Constraint(Default = SystemMethods.CurrentDateTime)]
|
||||
public DateTime DateRegistered { get; set; }
|
||||
|
||||
[Column("lastNotifiedDate")]
|
||||
public DateTime DateAccessed { get; set; }
|
||||
|
||||
[Column("isActive")]
|
||||
[Index(IndexTypes.NonClustered)]
|
||||
public bool IsActive { get; set; }
|
||||
|
||||
[Column("isMaster")]
|
||||
public bool IsMaster { get; set; }
|
||||
}
|
||||
}
|
||||
+24
-25
@@ -1,25 +1,24 @@
|
||||
using System;
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
{
|
||||
[Obsolete("This is no longer used and will be removed from Umbraco in future versions")]
|
||||
internal class StylesheetDto
|
||||
{
|
||||
[Column("nodeId")]
|
||||
[PrimaryKeyColumn(AutoIncrement = false)]
|
||||
[ForeignKey(typeof(NodeDto))]
|
||||
public int NodeId { get; set; }
|
||||
|
||||
[Column("filename")]
|
||||
[Length(100)]
|
||||
public string Filename { get; set; }
|
||||
|
||||
[Column("content")]
|
||||
[SpecialDbType(SpecialDbTypes.NTEXT)]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public string Content { get; set; }
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[Obsolete("This is no longer used and will be removed from Umbraco in future versions")]
|
||||
internal class StylesheetDto
|
||||
{
|
||||
[Column("nodeId")]
|
||||
[PrimaryKeyColumn(AutoIncrement = false)]
|
||||
[ForeignKey(typeof(NodeDto))]
|
||||
public int NodeId { get; set; }
|
||||
|
||||
[Column("filename")]
|
||||
[Length(100)]
|
||||
public string Filename { get; set; }
|
||||
|
||||
[Column("content")]
|
||||
[SpecialDbType(SpecialDbTypes.NTEXT)]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public string Content { get; set; }
|
||||
}
|
||||
}
|
||||
+28
-29
@@ -1,29 +1,28 @@
|
||||
using System;
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
{
|
||||
[Obsolete("This is no longer used and will be removed from Umbraco in future versions")]
|
||||
internal class StylesheetPropertyDto
|
||||
{
|
||||
[Column("nodeId")]
|
||||
[PrimaryKeyColumn(AutoIncrement = false)]
|
||||
public int NodeId { get; set; }
|
||||
|
||||
[Column("stylesheetPropertyEditor")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public bool? Editor { get; set; }
|
||||
|
||||
[Column("stylesheetPropertyAlias")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[Length(50)]
|
||||
public string Alias { get; set; }
|
||||
|
||||
[Column("stylesheetPropertyValue")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[Length(400)]
|
||||
public string Value { get; set; }
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[Obsolete("This is no longer used and will be removed from Umbraco in future versions")]
|
||||
internal class StylesheetPropertyDto
|
||||
{
|
||||
[Column("nodeId")]
|
||||
[PrimaryKeyColumn(AutoIncrement = false)]
|
||||
public int NodeId { get; set; }
|
||||
|
||||
[Column("stylesheetPropertyEditor")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public bool? Editor { get; set; }
|
||||
|
||||
[Column("stylesheetPropertyAlias")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[Length(50)]
|
||||
public string Alias { get; set; }
|
||||
|
||||
[Column("stylesheetPropertyValue")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[Length(400)]
|
||||
public string Value { get; set; }
|
||||
}
|
||||
}
|
||||
+34
-34
@@ -1,34 +1,34 @@
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.Tag)]
|
||||
[PrimaryKey("id")]
|
||||
[ExplicitColumns]
|
||||
internal class TagDto
|
||||
{
|
||||
[Column("id")]
|
||||
[PrimaryKeyColumn]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column("tag")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[Length(200)]
|
||||
[Index(IndexTypes.NonClustered, ForColumns = "tag,group", Name = "IX_cmsTags")]
|
||||
public string Tag { get; set; }//NOTE Is set to [varchar] (200) in Sql Server script
|
||||
|
||||
[Column("ParentId")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[ForeignKey(typeof(TagDto), Name = "FK_cmsTags_cmsTags")]
|
||||
public int? ParentId { get; set; }
|
||||
|
||||
[Column("group")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[Length(100)]
|
||||
public string Group { get; set; }//NOTE Is set to [varchar] (100) in Sql Server script
|
||||
|
||||
[ResultColumn("NodeCount")]
|
||||
public int NodeCount { get; set; }
|
||||
}
|
||||
}
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.Tag)]
|
||||
[PrimaryKey("id")]
|
||||
[ExplicitColumns]
|
||||
internal class TagDto
|
||||
{
|
||||
[Column("id")]
|
||||
[PrimaryKeyColumn]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column("tag")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[Length(200)]
|
||||
[Index(IndexTypes.NonClustered, ForColumns = "tag,group", Name = "IX_cmsTags")]
|
||||
public string Tag { get; set; }//NOTE Is set to [varchar] (200) in Sql Server script
|
||||
|
||||
[Column("ParentId")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[ForeignKey(typeof(TagDto), Name = "FK_cmsTags_cmsTags")]
|
||||
public int? ParentId { get; set; }
|
||||
|
||||
[Column("group")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[Length(100)]
|
||||
public string Group { get; set; }//NOTE Is set to [varchar] (100) in Sql Server script
|
||||
|
||||
[ResultColumn("NodeCount")]
|
||||
public int NodeCount { get; set; }
|
||||
}
|
||||
}
|
||||
+24
-24
@@ -1,24 +1,24 @@
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.TagRelationship)]
|
||||
[PrimaryKey("nodeId", AutoIncrement = false)]
|
||||
[ExplicitColumns]
|
||||
internal class TagRelationshipDto
|
||||
{
|
||||
[Column("nodeId")]
|
||||
[PrimaryKeyColumn(AutoIncrement = false, Name = "PK_cmsTagRelationship", OnColumns = "nodeId, propertyTypeId, tagId")]
|
||||
[ForeignKey(typeof(ContentDto), Name = "FK_cmsTagRelationship_cmsContent", Column = "nodeId")]
|
||||
public int NodeId { get; set; }
|
||||
|
||||
[Column("tagId")]
|
||||
[ForeignKey(typeof(TagDto))]
|
||||
public int TagId { get; set; }
|
||||
|
||||
[Column("propertyTypeId")]
|
||||
[ForeignKey(typeof(PropertyTypeDto), Name = "FK_cmsTagRelationship_cmsPropertyType")]
|
||||
public int PropertyTypeId { get; set; }
|
||||
}
|
||||
}
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.TagRelationship)]
|
||||
[PrimaryKey("nodeId", AutoIncrement = false)]
|
||||
[ExplicitColumns]
|
||||
internal class TagRelationshipDto
|
||||
{
|
||||
[Column("nodeId")]
|
||||
[PrimaryKeyColumn(AutoIncrement = false, Name = "PK_cmsTagRelationship", OnColumns = "nodeId, propertyTypeId, tagId")]
|
||||
[ForeignKey(typeof(ContentDto), Name = "FK_cmsTagRelationship_cmsContent", Column = "nodeId")]
|
||||
public int NodeId { get; set; }
|
||||
|
||||
[Column("tagId")]
|
||||
[ForeignKey(typeof(TagDto))]
|
||||
public int TagId { get; set; }
|
||||
|
||||
[Column("propertyTypeId")]
|
||||
[ForeignKey(typeof(PropertyTypeDto), Name = "FK_cmsTagRelationship_cmsPropertyType")]
|
||||
public int PropertyTypeId { get; set; }
|
||||
}
|
||||
}
|
||||
+50
-50
@@ -1,50 +1,50 @@
|
||||
using System;
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.Task)]
|
||||
[PrimaryKey("id")]
|
||||
[ExplicitColumns]
|
||||
internal class TaskDto
|
||||
{
|
||||
[Column("closed")]
|
||||
[Constraint(Default = "0")]
|
||||
public bool Closed { get; set; }
|
||||
|
||||
[Column("id")]
|
||||
[PrimaryKeyColumn]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column("taskTypeId")]
|
||||
[ForeignKey(typeof(TaskTypeDto))]
|
||||
public byte TaskTypeId { get; set; }
|
||||
|
||||
[Column("nodeId")]
|
||||
[ForeignKey(typeof(NodeDto))]
|
||||
public int NodeId { get; set; }
|
||||
|
||||
[Column("parentUserId")]
|
||||
[ForeignKey(typeof(UserDto), Name = "FK_cmsTask_umbracoUser")]
|
||||
public int ParentUserId { get; set; }
|
||||
|
||||
[Column("userId")]
|
||||
[ForeignKey(typeof(UserDto), Name = "FK_cmsTask_umbracoUser1")]
|
||||
public int UserId { get; set; }
|
||||
|
||||
[Column("DateTime")]
|
||||
[Constraint(Default = SystemMethods.CurrentDateTime)]
|
||||
public DateTime DateTime { get; set; }
|
||||
|
||||
[Column("Comment")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[Length(500)]
|
||||
public string Comment { get; set; }
|
||||
|
||||
[ResultColumn]
|
||||
[Reference(ReferenceType.OneToOne, ColumnName = "TaskTypeId")]
|
||||
public TaskTypeDto TaskTypeDto { get; set; }
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.Task)]
|
||||
[PrimaryKey("id")]
|
||||
[ExplicitColumns]
|
||||
internal class TaskDto
|
||||
{
|
||||
[Column("closed")]
|
||||
[Constraint(Default = "0")]
|
||||
public bool Closed { get; set; }
|
||||
|
||||
[Column("id")]
|
||||
[PrimaryKeyColumn]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column("taskTypeId")]
|
||||
[ForeignKey(typeof(TaskTypeDto))]
|
||||
public byte TaskTypeId { get; set; }
|
||||
|
||||
[Column("nodeId")]
|
||||
[ForeignKey(typeof(NodeDto))]
|
||||
public int NodeId { get; set; }
|
||||
|
||||
[Column("parentUserId")]
|
||||
[ForeignKey(typeof(UserDto), Name = "FK_cmsTask_umbracoUser")]
|
||||
public int ParentUserId { get; set; }
|
||||
|
||||
[Column("userId")]
|
||||
[ForeignKey(typeof(UserDto), Name = "FK_cmsTask_umbracoUser1")]
|
||||
public int UserId { get; set; }
|
||||
|
||||
[Column("DateTime")]
|
||||
[Constraint(Default = SystemMethods.CurrentDateTime)]
|
||||
public DateTime DateTime { get; set; }
|
||||
|
||||
[Column("Comment")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[Length(500)]
|
||||
public string Comment { get; set; }
|
||||
|
||||
[ResultColumn]
|
||||
[Reference(ReferenceType.OneToOne, ColumnName = "TaskTypeId")]
|
||||
public TaskTypeDto TaskTypeDto { get; set; }
|
||||
}
|
||||
}
|
||||
+19
-19
@@ -1,19 +1,19 @@
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.TaskType)]
|
||||
[PrimaryKey("id")]
|
||||
[ExplicitColumns]
|
||||
internal class TaskTypeDto
|
||||
{
|
||||
[Column("id")]
|
||||
[PrimaryKeyColumn(IdentitySeed = 2)]
|
||||
public byte Id { get; set; }
|
||||
|
||||
[Column("alias")]
|
||||
[Index(IndexTypes.NonClustered)]
|
||||
public string Alias { get; set; }
|
||||
}
|
||||
}
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.TaskType)]
|
||||
[PrimaryKey("id")]
|
||||
[ExplicitColumns]
|
||||
internal class TaskTypeDto
|
||||
{
|
||||
[Column("id")]
|
||||
[PrimaryKeyColumn(IdentitySeed = 2)]
|
||||
public byte Id { get; set; }
|
||||
|
||||
[Column("alias")]
|
||||
[Index(IndexTypes.NonClustered)]
|
||||
public string Alias { get; set; }
|
||||
}
|
||||
}
|
||||
+33
-33
@@ -1,33 +1,33 @@
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.Template)]
|
||||
[PrimaryKey("pk")]
|
||||
[ExplicitColumns]
|
||||
internal class TemplateDto
|
||||
{
|
||||
[Column("pk")]
|
||||
[PrimaryKeyColumn]
|
||||
public int PrimaryKey { get; set; }
|
||||
|
||||
[Column("nodeId")]
|
||||
[Index(IndexTypes.UniqueNonClustered)]
|
||||
[ForeignKey(typeof(NodeDto), Name = "FK_cmsTemplate_umbracoNode")]
|
||||
public int NodeId { get; set; }
|
||||
|
||||
[Column("alias")]
|
||||
[Length(100)]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public string Alias { get; set; }
|
||||
|
||||
[Column("design")]
|
||||
[SpecialDbType(SpecialDbTypes.NTEXT)]
|
||||
public string Design { get; set; }
|
||||
|
||||
[ResultColumn]
|
||||
[Reference(ReferenceType.OneToOne, ColumnName = "NodeId")]
|
||||
public NodeDto NodeDto { get; set; }
|
||||
}
|
||||
}
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.Template)]
|
||||
[PrimaryKey("pk")]
|
||||
[ExplicitColumns]
|
||||
internal class TemplateDto
|
||||
{
|
||||
[Column("pk")]
|
||||
[PrimaryKeyColumn]
|
||||
public int PrimaryKey { get; set; }
|
||||
|
||||
[Column("nodeId")]
|
||||
[Index(IndexTypes.UniqueNonClustered)]
|
||||
[ForeignKey(typeof(NodeDto), Name = "FK_cmsTemplate_umbracoNode")]
|
||||
public int NodeId { get; set; }
|
||||
|
||||
[Column("alias")]
|
||||
[Length(100)]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public string Alias { get; set; }
|
||||
|
||||
[Column("design")]
|
||||
[SpecialDbType(SpecialDbTypes.NTEXT)]
|
||||
public string Design { get; set; }
|
||||
|
||||
[ResultColumn]
|
||||
[Reference(ReferenceType.OneToOne, ColumnName = "NodeId")]
|
||||
public NodeDto NodeDto { get; set; }
|
||||
}
|
||||
}
|
||||
+25
-25
@@ -1,25 +1,25 @@
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.User2NodeNotify)]
|
||||
[PrimaryKey("userId", AutoIncrement = false)]
|
||||
[ExplicitColumns]
|
||||
internal class User2NodeNotifyDto
|
||||
{
|
||||
[Column("userId")]
|
||||
[PrimaryKeyColumn(AutoIncrement = false, Name = "PK_umbracoUser2NodeNotify", OnColumns = "userId, nodeId, action")]
|
||||
[ForeignKey(typeof(UserDto))]
|
||||
public int UserId { get; set; }
|
||||
|
||||
[Column("nodeId")]
|
||||
[ForeignKey(typeof(NodeDto))]
|
||||
public int NodeId { get; set; }
|
||||
|
||||
[Column("action")]
|
||||
[SpecialDbType(SpecialDbTypes.NCHAR)]
|
||||
[Length(1)]
|
||||
public string Action { get; set; }
|
||||
}
|
||||
}
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.User2NodeNotify)]
|
||||
[PrimaryKey("userId", AutoIncrement = false)]
|
||||
[ExplicitColumns]
|
||||
internal class User2NodeNotifyDto
|
||||
{
|
||||
[Column("userId")]
|
||||
[PrimaryKeyColumn(AutoIncrement = false, Name = "PK_umbracoUser2NodeNotify", OnColumns = "userId, nodeId, action")]
|
||||
[ForeignKey(typeof(UserDto))]
|
||||
public int UserId { get; set; }
|
||||
|
||||
[Column("nodeId")]
|
||||
[ForeignKey(typeof(NodeDto))]
|
||||
public int NodeId { get; set; }
|
||||
|
||||
[Column("action")]
|
||||
[SpecialDbType(SpecialDbTypes.NCHAR)]
|
||||
[Length(1)]
|
||||
public string Action { get; set; }
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.User2UserGroup)]
|
||||
[ExplicitColumns]
|
||||
+115
-115
@@ -1,115 +1,115 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.User)]
|
||||
[PrimaryKey("id", AutoIncrement = true)]
|
||||
[ExplicitColumns]
|
||||
internal class UserDto
|
||||
{
|
||||
public UserDto()
|
||||
{
|
||||
UserGroupDtos = new List<UserGroupDto>();
|
||||
UserStartNodeDtos = new HashSet<UserStartNodeDto>();
|
||||
}
|
||||
|
||||
[Column("id")]
|
||||
[PrimaryKeyColumn(Name = "PK_user")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column("userDisabled")]
|
||||
[Constraint(Default = "0")]
|
||||
public bool Disabled { get; set; }
|
||||
|
||||
[Column("userNoConsole")]
|
||||
[Constraint(Default = "0")]
|
||||
public bool NoConsole { get; set; }
|
||||
|
||||
[Column("userName")]
|
||||
public string UserName { get; set; }
|
||||
|
||||
[Column("userLogin")]
|
||||
[Length(125)]
|
||||
[Index(IndexTypes.NonClustered)]
|
||||
public string Login { get; set; }
|
||||
|
||||
[Column("userPassword")]
|
||||
[Length(500)]
|
||||
public string Password { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// This will represent a JSON structure of how the password has been created (i.e hash algorithm, iterations)
|
||||
/// </summary>
|
||||
[Column("passwordConfig")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[Length(500)]
|
||||
public string PasswordConfig { get; set; }
|
||||
|
||||
[Column("userEmail")]
|
||||
public string Email { get; set; }
|
||||
|
||||
[Column("userLanguage")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[Length(10)]
|
||||
public string UserLanguage { get; set; }
|
||||
|
||||
[Column("securityStampToken")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[Length(255)]
|
||||
public string SecurityStampToken { get; set; }
|
||||
|
||||
[Column("failedLoginAttempts")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public int? FailedLoginAttempts { get; set; }
|
||||
|
||||
[Column("lastLockoutDate")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public DateTime? LastLockoutDate { get; set; }
|
||||
|
||||
[Column("lastPasswordChangeDate")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public DateTime? LastPasswordChangeDate { get; set; }
|
||||
|
||||
[Column("lastLoginDate")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public DateTime? LastLoginDate { get; set; }
|
||||
|
||||
[Column("emailConfirmedDate")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public DateTime? EmailConfirmedDate { get; set; }
|
||||
|
||||
[Column("invitedDate")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public DateTime? InvitedDate { get; set; }
|
||||
|
||||
[Column("createDate")]
|
||||
[NullSetting(NullSetting = NullSettings.NotNull)]
|
||||
[Constraint(Default = SystemMethods.CurrentDateTime)]
|
||||
public DateTime CreateDate { get; set; }
|
||||
|
||||
[Column("updateDate")]
|
||||
[NullSetting(NullSetting = NullSettings.NotNull)]
|
||||
[Constraint(Default = SystemMethods.CurrentDateTime)]
|
||||
public DateTime UpdateDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Will hold the media file system relative path of the users custom avatar if they uploaded one
|
||||
/// </summary>
|
||||
[Column("avatar")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[Length(500)]
|
||||
public string Avatar { get; set; }
|
||||
|
||||
[ResultColumn]
|
||||
[Reference(ReferenceType.Many, ReferenceMemberName = "UserId")]
|
||||
public List<UserGroupDto> UserGroupDtos { get; set; }
|
||||
|
||||
[ResultColumn]
|
||||
[Reference(ReferenceType.Many, ReferenceMemberName = "UserId")]
|
||||
public HashSet<UserStartNodeDto> UserStartNodeDtos { get; set; }
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.User)]
|
||||
[PrimaryKey("id", AutoIncrement = true)]
|
||||
[ExplicitColumns]
|
||||
internal class UserDto
|
||||
{
|
||||
public UserDto()
|
||||
{
|
||||
UserGroupDtos = new List<UserGroupDto>();
|
||||
UserStartNodeDtos = new HashSet<UserStartNodeDto>();
|
||||
}
|
||||
|
||||
[Column("id")]
|
||||
[PrimaryKeyColumn(Name = "PK_user")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column("userDisabled")]
|
||||
[Constraint(Default = "0")]
|
||||
public bool Disabled { get; set; }
|
||||
|
||||
[Column("userNoConsole")]
|
||||
[Constraint(Default = "0")]
|
||||
public bool NoConsole { get; set; }
|
||||
|
||||
[Column("userName")]
|
||||
public string UserName { get; set; }
|
||||
|
||||
[Column("userLogin")]
|
||||
[Length(125)]
|
||||
[Index(IndexTypes.NonClustered)]
|
||||
public string Login { get; set; }
|
||||
|
||||
[Column("userPassword")]
|
||||
[Length(500)]
|
||||
public string Password { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// This will represent a JSON structure of how the password has been created (i.e hash algorithm, iterations)
|
||||
/// </summary>
|
||||
[Column("passwordConfig")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[Length(500)]
|
||||
public string PasswordConfig { get; set; }
|
||||
|
||||
[Column("userEmail")]
|
||||
public string Email { get; set; }
|
||||
|
||||
[Column("userLanguage")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[Length(10)]
|
||||
public string UserLanguage { get; set; }
|
||||
|
||||
[Column("securityStampToken")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[Length(255)]
|
||||
public string SecurityStampToken { get; set; }
|
||||
|
||||
[Column("failedLoginAttempts")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public int? FailedLoginAttempts { get; set; }
|
||||
|
||||
[Column("lastLockoutDate")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public DateTime? LastLockoutDate { get; set; }
|
||||
|
||||
[Column("lastPasswordChangeDate")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public DateTime? LastPasswordChangeDate { get; set; }
|
||||
|
||||
[Column("lastLoginDate")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public DateTime? LastLoginDate { get; set; }
|
||||
|
||||
[Column("emailConfirmedDate")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public DateTime? EmailConfirmedDate { get; set; }
|
||||
|
||||
[Column("invitedDate")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public DateTime? InvitedDate { get; set; }
|
||||
|
||||
[Column("createDate")]
|
||||
[NullSetting(NullSetting = NullSettings.NotNull)]
|
||||
[Constraint(Default = SystemMethods.CurrentDateTime)]
|
||||
public DateTime CreateDate { get; set; }
|
||||
|
||||
[Column("updateDate")]
|
||||
[NullSetting(NullSetting = NullSettings.NotNull)]
|
||||
[Constraint(Default = SystemMethods.CurrentDateTime)]
|
||||
public DateTime UpdateDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Will hold the media file system relative path of the users custom avatar if they uploaded one
|
||||
/// </summary>
|
||||
[Column("avatar")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[Length(500)]
|
||||
public string Avatar { get; set; }
|
||||
|
||||
[ResultColumn]
|
||||
[Reference(ReferenceType.Many, ReferenceMemberName = "UserId")]
|
||||
public List<UserGroupDto> UserGroupDtos { get; set; }
|
||||
|
||||
[ResultColumn]
|
||||
[Reference(ReferenceType.Many, ReferenceMemberName = "UserId")]
|
||||
public HashSet<UserStartNodeDto> UserStartNodeDtos { get; set; }
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.UserGroup2App)]
|
||||
[ExplicitColumns]
|
||||
+23
-23
@@ -1,23 +1,23 @@
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.UserGroup2NodePermission)]
|
||||
[ExplicitColumns]
|
||||
internal class UserGroup2NodePermissionDto
|
||||
{
|
||||
[Column("userGroupId")]
|
||||
[PrimaryKeyColumn(AutoIncrement = false, Name = "PK_umbracoUserGroup2NodePermission", OnColumns = "userGroupId, nodeId, permission")]
|
||||
[ForeignKey(typeof(UserGroupDto))]
|
||||
public int UserGroupId { get; set; }
|
||||
|
||||
[Column("nodeId")]
|
||||
[ForeignKey(typeof(NodeDto))]
|
||||
[Index(IndexTypes.NonClustered, Name = "IX_umbracoUser2NodePermission_nodeId")]
|
||||
public int NodeId { get; set; }
|
||||
|
||||
[Column("permission")]
|
||||
public string Permission { get; set; }
|
||||
}
|
||||
}
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.UserGroup2NodePermission)]
|
||||
[ExplicitColumns]
|
||||
internal class UserGroup2NodePermissionDto
|
||||
{
|
||||
[Column("userGroupId")]
|
||||
[PrimaryKeyColumn(AutoIncrement = false, Name = "PK_umbracoUserGroup2NodePermission", OnColumns = "userGroupId, nodeId, permission")]
|
||||
[ForeignKey(typeof(UserGroupDto))]
|
||||
public int UserGroupId { get; set; }
|
||||
|
||||
[Column("nodeId")]
|
||||
[ForeignKey(typeof(NodeDto))]
|
||||
[Index(IndexTypes.NonClustered, Name = "IX_umbracoUser2NodePermission_nodeId")]
|
||||
public int NodeId { get; set; }
|
||||
|
||||
[Column("permission")]
|
||||
public string Permission { get; set; }
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -4,7 +4,7 @@ using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.UserGroup)]
|
||||
[PrimaryKey("id")]
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.UserStartNode)]
|
||||
[PrimaryKey("id", AutoIncrement = true)]
|
||||
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Factories
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@ using System.Linq;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.EntityBase;
|
||||
using Umbraco.Core.Models.Membership;
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Factories
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Factories
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Factories
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Factories
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using Umbraco.Core.Models.Identity;
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Factories
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Globalization;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Factories
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Factories
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Factories
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
using Umbraco.Core.Persistence.Repositories;
|
||||
using Umbraco.Core.Persistence.Repositories.Implement;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Factories
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Factories
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Factories
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Factories
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Factories
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Factories
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Factories
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Factories
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Factories
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@ using Umbraco.Core.Configuration.UmbracoSettings;
|
||||
using Umbraco.Core.IO;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.EntityBase;
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Factories
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using Umbraco.Core.Models.Membership;
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Factories
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using Umbraco.Core.Models.Membership;
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Factories
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Concurrent;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Mappers
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Concurrent;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Mappers
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Concurrent;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Mappers
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Concurrent;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Mappers
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Concurrent;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Mappers
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Concurrent;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Mappers
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Concurrent;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Mappers
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Concurrent;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Mappers
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Concurrent;
|
||||
using Umbraco.Core.Models.Identity;
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Mappers
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Concurrent;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Mappers
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Concurrent;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Mappers
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Concurrent;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Mappers
|
||||
{
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user