feat(Documents) Notes/Docs page improvements and warning cleanup

This commit is contained in:
2022-04-07 13:30:00 -04:00
parent b270453030
commit d82e60efdf
223 changed files with 4396 additions and 2861 deletions
+10
View File
@@ -0,0 +1,10 @@
using System.ComponentModel.DataAnnotations;
namespace Model.Doc;
public class DocConnectionModel
{
[Key] public int Id { get; set; } = 1;
public int ParentId { get; set; } = 1;
public int ChildId { get; set; } = 1;
}
+37
View File
@@ -0,0 +1,37 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Model.Doc;
public class DocContentModel
{
[Key] public int Id { get; set; } = 1;
public int? ParentId { get; set; } = null;
public int? DocSectionModelId { get; set; } = null;
public string Href { get; set; }
[NotMapped] public virtual ICollection<DocContentModel> DocumentationModels { get; set; } = new List<DocContentModel>();
[NotMapped] public virtual DocContentModel Parent { get; set; }
[NotMapped] public virtual int PageOrder { get; set; }
public DateTime CreatedDate { get; set; }
public DateTime UpdatedDate { get; set; }
public string Name { get; set; } = "";
public string Description { get; set; } = null;
public string Content { get; set; } = "";
private string GetLink()
{
var link = Href;
if (Parent != null) link = $"{Parent.GetLink()}/" + link;
return link;
}
public string GetDocLink()
{
return $"docs/{GetLink()}";
}
}
+15
View File
@@ -0,0 +1,15 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Model.Doc;
public class DocSectionModel
{
[Key] public int Id { get; set; }
public string Name { get; set; }
[NotMapped]
public virtual ICollection<DocContentModel> DocumentationModels { get; set; } = new List<DocContentModel>();
}