mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-26 07:38:33 -06:00
reformatted models
This commit is contained in:
@@ -1,16 +1,15 @@
|
||||
|
||||
|
||||
namespace Model.Modules {
|
||||
|
||||
public class CompletionRequirementModel {
|
||||
|
||||
[JsonPropertyName("type")]
|
||||
public string Type { get; set; }
|
||||
|
||||
[JsonPropertyName("min_score")]
|
||||
public double? MinScore { get; set; }
|
||||
|
||||
[JsonPropertyName("completed")]
|
||||
public bool? Completed { get; set; }
|
||||
}
|
||||
namespace CanvasModel.Modules;
|
||||
public class CompletionRequirementModel
|
||||
{
|
||||
|
||||
[JsonPropertyName("type")]
|
||||
public string Type { get; set; }
|
||||
|
||||
[JsonPropertyName("min_score")]
|
||||
public double? MinScore { get; set; }
|
||||
|
||||
[JsonPropertyName("completed")]
|
||||
public bool? Completed { get; set; }
|
||||
}
|
||||
|
||||
@@ -1,27 +1,23 @@
|
||||
using System;
|
||||
|
||||
namespace CanvasModel.Modules;
|
||||
public class ContentDetailsModel
|
||||
{
|
||||
|
||||
[JsonPropertyName("points_possible")]
|
||||
public uint? PointsPossible { get; set; }
|
||||
|
||||
namespace Model.Modules {
|
||||
|
||||
public class ContentDetailsModel {
|
||||
|
||||
[JsonPropertyName("points_possible")]
|
||||
public uint? PointsPossible { get; set; }
|
||||
|
||||
[JsonPropertyName("due_at")]
|
||||
public DateTime? DueAt { get; set; }
|
||||
|
||||
[JsonPropertyName("unlock_at")]
|
||||
public DateTime? UnlockAt { get; set; }
|
||||
|
||||
[JsonPropertyName("lock_at")]
|
||||
public DateTime? LockAt { get; set; }
|
||||
|
||||
[JsonPropertyName("locked_for_user")]
|
||||
public bool? LockedForUser { get; set; }
|
||||
|
||||
[JsonPropertyName("lock_explanation")]
|
||||
public string? LockExplanation { get; set; }
|
||||
}
|
||||
[JsonPropertyName("due_at")]
|
||||
public DateTime? DueAt { get; set; }
|
||||
|
||||
[JsonPropertyName("unlock_at")]
|
||||
public DateTime? UnlockAt { get; set; }
|
||||
|
||||
[JsonPropertyName("lock_at")]
|
||||
public DateTime? LockAt { get; set; }
|
||||
|
||||
[JsonPropertyName("locked_for_user")]
|
||||
public bool? LockedForUser { get; set; }
|
||||
|
||||
[JsonPropertyName("lock_explanation")]
|
||||
public string? LockExplanation { get; set; }
|
||||
}
|
||||
|
||||
@@ -1,52 +1,48 @@
|
||||
|
||||
namespace CanvasModel.Modules;
|
||||
public class ModuleItemModel
|
||||
{
|
||||
|
||||
[JsonPropertyName("id")]
|
||||
public ulong Id { get; set; }
|
||||
|
||||
[JsonPropertyName("module_id")]
|
||||
public ulong ModuleId { get; set; }
|
||||
|
||||
namespace Model.Modules {
|
||||
|
||||
public class ModuleItemModel {
|
||||
|
||||
[JsonPropertyName("id")]
|
||||
public ulong Id { get; set; }
|
||||
|
||||
[JsonPropertyName("module_id")]
|
||||
public ulong ModuleId { get; set; }
|
||||
|
||||
[JsonPropertyName("position")]
|
||||
public uint Position { get; set; }
|
||||
|
||||
[JsonPropertyName("title")]
|
||||
public string Title { get; set; }
|
||||
|
||||
[JsonPropertyName("indent")]
|
||||
public uint? Indent { get; set; }
|
||||
|
||||
[JsonPropertyName("type")]
|
||||
public string Type { get; set; }
|
||||
|
||||
[JsonPropertyName("content_id")]
|
||||
public ulong? ContentId { get; set; }
|
||||
|
||||
[JsonPropertyName("html_url")]
|
||||
public string HtmlUrl { get; set; }
|
||||
|
||||
[JsonPropertyName("url")]
|
||||
public string? Url { get; set; }
|
||||
|
||||
[JsonPropertyName("page_url")]
|
||||
public string? PageUrl { get; set; }
|
||||
|
||||
[JsonPropertyName("external_url")]
|
||||
public string? ExternalUrl { get; set; }
|
||||
|
||||
[JsonPropertyName("new_tab")]
|
||||
public bool NewTab { get; set; }
|
||||
|
||||
// [OptIn]
|
||||
[JsonPropertyName("completion_requirement")]
|
||||
public CompletionRequirementModel? CompletionRequirement { get; set; }
|
||||
|
||||
[JsonPropertyName("published")]
|
||||
public bool? Published { get; set; }
|
||||
}
|
||||
[JsonPropertyName("position")]
|
||||
public uint Position { get; set; }
|
||||
|
||||
[JsonPropertyName("title")]
|
||||
public string Title { get; set; }
|
||||
|
||||
[JsonPropertyName("indent")]
|
||||
public uint? Indent { get; set; }
|
||||
|
||||
[JsonPropertyName("type")]
|
||||
public string Type { get; set; }
|
||||
|
||||
[JsonPropertyName("content_id")]
|
||||
public ulong? ContentId { get; set; }
|
||||
|
||||
[JsonPropertyName("html_url")]
|
||||
public string HtmlUrl { get; set; }
|
||||
|
||||
[JsonPropertyName("url")]
|
||||
public string? Url { get; set; }
|
||||
|
||||
[JsonPropertyName("page_url")]
|
||||
public string? PageUrl { get; set; }
|
||||
|
||||
[JsonPropertyName("external_url")]
|
||||
public string? ExternalUrl { get; set; }
|
||||
|
||||
[JsonPropertyName("new_tab")]
|
||||
public bool NewTab { get; set; }
|
||||
|
||||
// [OptIn]
|
||||
[JsonPropertyName("completion_requirement")]
|
||||
public CompletionRequirementModel? CompletionRequirement { get; set; }
|
||||
|
||||
[JsonPropertyName("published")]
|
||||
public bool? Published { get; set; }
|
||||
}
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
|
||||
namespace Model.Modules {
|
||||
|
||||
public class ModuleItemSequenceModel {
|
||||
|
||||
[JsonPropertyName("items")]
|
||||
public IEnumerable<ModuleItemSequenceNodeModel> Items { get; set; }
|
||||
}
|
||||
namespace CanvasModel.Modules;
|
||||
public class ModuleItemSequenceModel
|
||||
{
|
||||
[JsonPropertyName("items")]
|
||||
public IEnumerable<ModuleItemSequenceNodeModel> Items { get; set; }
|
||||
}
|
||||
|
||||
@@ -1,20 +1,17 @@
|
||||
|
||||
namespace CanvasModel.Modules;
|
||||
public class ModuleItemSequenceNodeModel
|
||||
{
|
||||
|
||||
[JsonPropertyName("prev")]
|
||||
public ModuleItemModel? Prev { get; set; }
|
||||
|
||||
[JsonPropertyName("current")]
|
||||
public ModuleItemModel Current { get; set; }
|
||||
|
||||
namespace Model.Modules {
|
||||
public class ModuleItemSequenceNodeModel {
|
||||
|
||||
[JsonPropertyName("prev")]
|
||||
public ModuleItemModel? Prev { get; set; }
|
||||
|
||||
[JsonPropertyName("current")]
|
||||
public ModuleItemModel Current { get; set; }
|
||||
|
||||
[JsonPropertyName("next")]
|
||||
public ModuleItemModel? Next { get; set; }
|
||||
|
||||
[JsonPropertyName("mastery_path")]
|
||||
public object? MasteryPath { get; set; } // todo concrete type?
|
||||
}
|
||||
[JsonPropertyName("next")]
|
||||
public ModuleItemModel? Next { get; set; }
|
||||
|
||||
[JsonPropertyName("mastery_path")]
|
||||
public object? MasteryPath { get; set; } // todo concrete type?
|
||||
}
|
||||
|
||||
@@ -1,56 +1,50 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace CanvasModel.Modules;
|
||||
public class ModuleModel
|
||||
{
|
||||
|
||||
[JsonPropertyName("id")]
|
||||
public ulong Id { get; set; }
|
||||
|
||||
[JsonPropertyName("workflow_state")]
|
||||
public string WorkflowState { get; set; }
|
||||
|
||||
namespace Model.Modules {
|
||||
|
||||
public class ModuleModel {
|
||||
|
||||
[JsonPropertyName("id")]
|
||||
public ulong Id { get; set; }
|
||||
|
||||
[JsonPropertyName("workflow_state")]
|
||||
public string WorkflowState { get; set; }
|
||||
|
||||
[JsonPropertyName("position")]
|
||||
public uint Position { get; set; }
|
||||
|
||||
[JsonPropertyName("name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
[JsonPropertyName("unlock_at")]
|
||||
public DateTime? UnlockAt { get; set; }
|
||||
|
||||
[JsonPropertyName("require_sequential_progress")]
|
||||
public bool? RequireSequentialProgress { get; set; }
|
||||
|
||||
[JsonPropertyName("prerequisite_module_ids")]
|
||||
public IEnumerable<ulong>? PrerequisiteModuleIds { get; set; }
|
||||
|
||||
[JsonPropertyName("items_count")]
|
||||
public uint ItemsCount { get; set; }
|
||||
|
||||
[JsonPropertyName("items_url")]
|
||||
public string ItemsUrl { get; set; }
|
||||
|
||||
// [OptIn]
|
||||
// [Enigmatic] // can be null if "the module is deemed too large", even if opted-in
|
||||
[JsonPropertyName("items")]
|
||||
public IEnumerable<ModuleItemModel>? Items { get; set; }
|
||||
|
||||
[JsonPropertyName("state")]
|
||||
public string? State { get; set; } // todo make sure this is an enum in Structure class
|
||||
|
||||
// [OptIn]
|
||||
[JsonPropertyName("completed_at")]
|
||||
public DateTime? CompletedAt { get; set; }
|
||||
|
||||
[JsonPropertyName("publish_final_grade")]
|
||||
public bool? PublishFinalGrade { get; set; }
|
||||
|
||||
[JsonPropertyName("published")]
|
||||
public bool? Published { get; set; }
|
||||
}
|
||||
[JsonPropertyName("position")]
|
||||
public uint Position { get; set; }
|
||||
|
||||
[JsonPropertyName("name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
[JsonPropertyName("unlock_at")]
|
||||
public DateTime? UnlockAt { get; set; }
|
||||
|
||||
[JsonPropertyName("require_sequential_progress")]
|
||||
public bool? RequireSequentialProgress { get; set; }
|
||||
|
||||
[JsonPropertyName("prerequisite_module_ids")]
|
||||
public IEnumerable<ulong>? PrerequisiteModuleIds { get; set; }
|
||||
|
||||
[JsonPropertyName("items_count")]
|
||||
public uint ItemsCount { get; set; }
|
||||
|
||||
[JsonPropertyName("items_url")]
|
||||
public string ItemsUrl { get; set; }
|
||||
|
||||
// [OptIn]
|
||||
// [Enigmatic] // can be null if "the module is deemed too large", even if opted-in
|
||||
[JsonPropertyName("items")]
|
||||
public IEnumerable<ModuleItemModel>? Items { get; set; }
|
||||
|
||||
[JsonPropertyName("state")]
|
||||
public string? State { get; set; } // todo make sure this is an enum in Structure class
|
||||
|
||||
// [OptIn]
|
||||
[JsonPropertyName("completed_at")]
|
||||
public DateTime? CompletedAt { get; set; }
|
||||
|
||||
[JsonPropertyName("publish_final_grade")]
|
||||
public bool? PublishFinalGrade { get; set; }
|
||||
|
||||
[JsonPropertyName("published")]
|
||||
public bool? Published { get; set; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user