restructured components so that there are more components in the pages

This commit is contained in:
2024-01-11 17:28:14 -07:00
parent 4fb5d9a25d
commit 5666d3dc85
22 changed files with 110 additions and 85 deletions

View File

@@ -0,0 +1,32 @@
namespace CanvasModel.Pages;
public record PageModel (
[property: JsonPropertyName("page_id")] string PageId,
[property: JsonPropertyName("url")] string Url,
[property: JsonPropertyName("title")] string Title,
[property: JsonPropertyName("published")] bool Published,
[property: JsonPropertyName("front_page")] bool FrontPage,
[property: JsonPropertyName("body")] string? Body
);
// [JsonPropertyName("created_at")]
// public DateTime CreatedAt { get; set; }
// [JsonPropertyName("updated_at")]
// public DateTime UpdatedAt { get; set; }
// [JsonPropertyName("editing_roles")]
// public string EditingRoles { get; set; }
// [JsonPropertyName("last_edited_by")]
// public UserDisplayModel LastEditedBy { get; set; }
// [JsonPropertyName("locked_for_user")]
// public bool LockedForUser { get; set; }
// [JsonPropertyName("lock_info")]
// public LockInfoModel? LockInfo { get; set; }
// [JsonPropertyName("lock_explanation")]
// public string? LockExplanation { get; set; }

View File

@@ -0,0 +1,8 @@
namespace LocalModels;
public record LocalCoursePage
{
public required string Title { get; init; }
public required string Text { get; set; }
public DateTime? DueDateForOrdering { get; init; }
}

View File

@@ -4,9 +4,7 @@ public record LocalModule
{
public string Name { get; init; } = string.Empty;
public string Notes { get; set; } = string.Empty;
public IEnumerable<LocalAssignment> Assignments { get; init; } =
Enumerable.Empty<LocalAssignment>();
public IEnumerable<LocalQuiz> Quizzes { get; init; } = Enumerable.Empty<LocalQuiz>();
public IEnumerable<LocalAssignment> Assignments { get; init; } = [];
public IEnumerable<LocalQuiz> Quizzes { get; init; } = [];
public IEnumerable<LocalCoursePage> Pages { get; init; } = [];
}