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.Notes;
public class NoteConnectionModel
{
[Key] public int Id { get; set; } = 1;
public int ParentId { get; set; } = 1;
public int ChildId { get; set; } = 1;
}
+47
View File
@@ -0,0 +1,47 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using Model.Doc;
namespace Model.Notes;
public class NoteContentModel
{
public int Id { get; set; }
public int? ParentId { get; set; } = null;
public int? NoteSectionModelId { get; set; } = null;
public string Href { get; set; }
//public DateTime LastUpdated { get; set; }
public DateTime CreatedDate { get; set; }
public DateTime UpdatedDate { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public string Content { get; set; }
public string IsHidden { get; set; } = "False";
public string IsPreAlpha { get; set; } = "True";
[NotMapped] public virtual ICollection<NoteContentModel> NoteContentModels { get; set; } = new List<NoteContentModel>();
[NotMapped] public virtual NoteContentModel Parent { get; set; }
[NotMapped] public virtual int PageOrder { get; set; }
private string GetLink()
{
var link = Href;
if (Parent != null) link = $"{Parent.GetLink()}/" + link;
return link;
}
public string GetNoteLink()
{
return $"notes/{GetLink()}";
}
}
-18
View File
@@ -1,18 +0,0 @@
using System;
using System.Collections.Generic;
namespace Model.Immortal.Notes;
public class NoteModel {
public int Id { get; set; }
public DateTime LastUpdated { get; set; }
public string Name { get; set; }
public string Section { get; set; }
public string Description { get; set; }
public bool IsHidden { get; set; } = false;
public bool IsPreAlpha { get; set; } = true;
public string DEPRECATED_Id() {
return (Section + "-" + Name).ToLower().Replace(" ", "-");
}
}
+15
View File
@@ -0,0 +1,15 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Model.Notes;
public class NoteSectionModel
{
[Key] public int Id { get; set; }
public string Name { get; set; }
[NotMapped]
public virtual ICollection<NoteContentModel> NoteContentModels { get; set; } = new List<NoteContentModel>();
}