mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-26 15:48:32 -06:00
model refactorings
This commit is contained in:
@@ -1,185 +1,163 @@
|
||||
|
||||
using CanvasModel.Assignments;
|
||||
using CanvasModel.Courses;
|
||||
using CanvasModel.Submissions;
|
||||
|
||||
namespace CanvasModel.Users;
|
||||
public class ActivityStreamObjectModel
|
||||
{
|
||||
// General
|
||||
[JsonPropertyName("created_at")]
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public record ActivityStreamObjectModel
|
||||
(
|
||||
[property: JsonPropertyName("created_at")]
|
||||
DateTime CreatedAt,
|
||||
|
||||
[JsonPropertyName("updated_at")]
|
||||
public DateTime? UpdatedAt { get; set; }
|
||||
[property: JsonPropertyName("id")]
|
||||
ulong Id,
|
||||
|
||||
[JsonPropertyName("id")]
|
||||
public ulong Id { get; set; }
|
||||
[property: JsonPropertyName("title")]
|
||||
string Title,
|
||||
|
||||
[JsonPropertyName("title")]
|
||||
public string Title { get; set; }
|
||||
[property: JsonPropertyName("message")]
|
||||
string Message,
|
||||
|
||||
[JsonPropertyName("message")]
|
||||
public string Message { get; set; }
|
||||
[property: JsonPropertyName("type")]
|
||||
string Type,
|
||||
|
||||
[JsonPropertyName("type")]
|
||||
public string Type { get; set; }
|
||||
[property: JsonPropertyName("read_state")]
|
||||
bool ReadState,
|
||||
|
||||
[JsonPropertyName("read_state")]
|
||||
public bool ReadState { get; set; }
|
||||
[property: JsonPropertyName("context_type")]
|
||||
string ContextType,
|
||||
|
||||
[JsonPropertyName("context_type")]
|
||||
public string ContextType { get; set; }
|
||||
[property: JsonPropertyName("html_url")]
|
||||
string HtmlUrl,
|
||||
|
||||
[JsonPropertyName("course_id")]
|
||||
public ulong? CourseId { get; set; }
|
||||
[property: JsonPropertyName("notification_category")]
|
||||
string NotificationCategory,
|
||||
|
||||
[JsonPropertyName("group_id")]
|
||||
public ulong? GroupId { get; set; }
|
||||
[property: JsonPropertyName("grade")]
|
||||
string Grade,
|
||||
|
||||
[JsonPropertyName("html_url")]
|
||||
public string HtmlUrl { get; set; }
|
||||
[property: JsonPropertyName("preview_url")]
|
||||
string PreviewUrl,
|
||||
|
||||
// Type = DiscussionTopic | Announcement
|
||||
[property: JsonPropertyName("submission_type")]
|
||||
string SubmissionType,
|
||||
|
||||
[JsonPropertyName("total_root_discussion_entries")]
|
||||
public uint? TotalRootDiscussionEntries { get; set; }
|
||||
[property: JsonPropertyName("late_policy_status")]
|
||||
string LatePolicyStatus,
|
||||
|
||||
[JsonPropertyName("require_initial_post")]
|
||||
public bool? RequireInitialPost { get; set; }
|
||||
[property: JsonPropertyName("workflow_state")]
|
||||
string WorkflowState,
|
||||
|
||||
[JsonPropertyName("user_has_posted")]
|
||||
public bool? UserHasPosted { get; set; }
|
||||
[property: JsonPropertyName("updated_at")]
|
||||
DateTime? UpdatedAt = null,
|
||||
|
||||
[JsonPropertyName("root_discussion_entries")]
|
||||
public object RootDiscussionEntries { get; set; } // todo this class/model
|
||||
[property: JsonPropertyName("course_id")]
|
||||
ulong? CourseId = null,
|
||||
|
||||
// Type = DiscussionTopic
|
||||
[property: JsonPropertyName("group_id")]
|
||||
ulong? GroupId = null,
|
||||
|
||||
[JsonPropertyName("discussion_topic_id")]
|
||||
public ulong? DiscussionTopicId { get; set; }
|
||||
[property: JsonPropertyName("total_root_discussion_entries")]
|
||||
uint? TotalRootDiscussionEntries = null,
|
||||
|
||||
// Type = Announcement
|
||||
[property: JsonPropertyName("require_initial_post")]
|
||||
bool? RequireInitialPost = null,
|
||||
|
||||
[JsonPropertyName("announcement_id")]
|
||||
public ulong? AnnouncementId { get; set; }
|
||||
[property: JsonPropertyName("user_has_posted")]
|
||||
bool? UserHasPosted = null,
|
||||
|
||||
// Type = Conversation
|
||||
[property: JsonPropertyName("root_discussion_entries")]
|
||||
object RootDiscussionEntries = null,
|
||||
|
||||
[JsonPropertyName("conversation_id")]
|
||||
public ulong? ConversationId { get; set; }
|
||||
[property: JsonPropertyName("discussion_topic_id")]
|
||||
ulong? DiscussionTopicId = null,
|
||||
|
||||
[JsonPropertyName("private")]
|
||||
public bool? Private { get; set; }
|
||||
[property: JsonPropertyName("announcement_id")]
|
||||
ulong? AnnouncementId = null,
|
||||
|
||||
[JsonPropertyName("participant_count")]
|
||||
public uint? ParticipantCount { get; set; }
|
||||
[property: JsonPropertyName("conversation_id")]
|
||||
ulong? ConversationId = null,
|
||||
|
||||
// Type = Message
|
||||
[property: JsonPropertyName("private")]
|
||||
bool? Private = null,
|
||||
|
||||
[JsonPropertyName("message_id")]
|
||||
public ulong? MessageId { get; set; }
|
||||
[property: JsonPropertyName("participant_count")]
|
||||
uint? ParticipantCount = null,
|
||||
|
||||
[JsonPropertyName("notification_category")]
|
||||
public string NotificationCategory { get; set; }
|
||||
[property: JsonPropertyName("message_id")]
|
||||
ulong? MessageId = null,
|
||||
|
||||
// Type = Submission
|
||||
[property: JsonPropertyName("assignment_id")]
|
||||
ulong? AssignmentId = null,
|
||||
|
||||
[JsonPropertyName("assignment_id")]
|
||||
public ulong? AssignmentId { get; set; }
|
||||
[property: JsonPropertyName("assignment")]
|
||||
AssignmentModel? Assignment = null,
|
||||
|
||||
[JsonPropertyName("assignment")]
|
||||
public AssignmentModel? Assignment { get; set; }
|
||||
[property: JsonPropertyName("course")]
|
||||
CourseModel? Course = null,
|
||||
|
||||
[JsonPropertyName("course")]
|
||||
public CourseModel? Course { get; set; }
|
||||
[property: JsonPropertyName("attempt")]
|
||||
uint? Attempt = null,
|
||||
|
||||
[JsonPropertyName("attempt")]
|
||||
public uint? Attempt { get; set; }
|
||||
[property: JsonPropertyName("body")]
|
||||
string? Body = null,
|
||||
|
||||
[JsonPropertyName("body")]
|
||||
public string? Body { get; set; }
|
||||
[property: JsonPropertyName("grade_matches_current_submission")]
|
||||
bool? GradeMatchesCurrentSubmission = null,
|
||||
|
||||
[JsonPropertyName("grade")]
|
||||
public string Grade { get; set; }
|
||||
[property: JsonPropertyName("score")]
|
||||
decimal? Score = null,
|
||||
|
||||
[JsonPropertyName("grade_matches_current_submission")]
|
||||
public bool? GradeMatchesCurrentSubmission { get; set; }
|
||||
[property: JsonPropertyName("submission_comments")]
|
||||
IEnumerable<SubmissionCommentModel>? SubmissionComments = null,
|
||||
|
||||
[JsonPropertyName("preview_url")]
|
||||
public string PreviewUrl { get; set; }
|
||||
[property: JsonPropertyName("submitted_at")]
|
||||
DateTime? SubmittedAt = null,
|
||||
|
||||
[JsonPropertyName("score")]
|
||||
public decimal? Score { get; set; }
|
||||
[property: JsonPropertyName("url")]
|
||||
string? Url = null,
|
||||
|
||||
[JsonPropertyName("submission_comments")]
|
||||
public IEnumerable<SubmissionCommentModel>? SubmissionComments { get; set; }
|
||||
[property: JsonPropertyName("user_id")]
|
||||
ulong? UserId = null,
|
||||
|
||||
[JsonPropertyName("submission_type")]
|
||||
public string SubmissionType { get; set; }
|
||||
[property: JsonPropertyName("grader_id")]
|
||||
long? GraderId = null,
|
||||
|
||||
[JsonPropertyName("submitted_at")]
|
||||
public DateTime? SubmittedAt { get; set; }
|
||||
[property: JsonPropertyName("graded_at")]
|
||||
DateTime? GradedAt = null,
|
||||
|
||||
[JsonPropertyName("url")]
|
||||
public string? Url { get; set; }
|
||||
[property: JsonPropertyName("user")]
|
||||
UserModel? User = null,
|
||||
|
||||
[JsonPropertyName("user_id")]
|
||||
public ulong? UserId { get; set; }
|
||||
[property: JsonPropertyName("late")]
|
||||
bool? Late = null,
|
||||
|
||||
[JsonPropertyName("grader_id")]
|
||||
public long? GraderId { get; set; } // why can this be negative???
|
||||
[property: JsonPropertyName("assignment_visible")]
|
||||
bool? AssignmentVisible = null,
|
||||
|
||||
[JsonPropertyName("graded_at")]
|
||||
public DateTime? GradedAt { get; set; }
|
||||
[property: JsonPropertyName("excused")]
|
||||
bool? Excused = null,
|
||||
|
||||
[JsonPropertyName("user")]
|
||||
public UserModel? User { get; set; }
|
||||
[property: JsonPropertyName("missing")]
|
||||
bool? Missing = null,
|
||||
|
||||
[JsonPropertyName("late")]
|
||||
public bool? Late { get; set; }
|
||||
[property: JsonPropertyName("points_deducted")]
|
||||
double? PointsDeducted = null,
|
||||
|
||||
[JsonPropertyName("assignment_visible")]
|
||||
public bool? AssignmentVisible { get; set; }
|
||||
[property: JsonPropertyName("seconds_late")]
|
||||
double? SecondsLate = null,
|
||||
|
||||
[JsonPropertyName("excused")]
|
||||
public bool? Excused { get; set; }
|
||||
[property: JsonPropertyName("extra_attempts")]
|
||||
uint? ExtraAttempts = null,
|
||||
|
||||
[JsonPropertyName("missing")]
|
||||
public bool? Missing { get; set; }
|
||||
[property: JsonPropertyName("anonymous_id")]
|
||||
string? AnonymousId = null,
|
||||
|
||||
[JsonPropertyName("late_policy_status")]
|
||||
public string LatePolicyStatus { get; set; }
|
||||
[property: JsonPropertyName("web_conference_id")]
|
||||
ulong? WebConferenceId = null,
|
||||
|
||||
[JsonPropertyName("points_deducted")]
|
||||
public double? PointsDeducted { get; set; }
|
||||
[property: JsonPropertyName("collaboration_id")]
|
||||
ulong? CollaborationId = null,
|
||||
|
||||
[JsonPropertyName("seconds_late")]
|
||||
public double? SecondsLate { get; set; }
|
||||
|
||||
[JsonPropertyName("workflow_state")]
|
||||
public string WorkflowState { get; set; }
|
||||
|
||||
[JsonPropertyName("extra_attempts")]
|
||||
public uint? ExtraAttempts { get; set; }
|
||||
|
||||
[JsonPropertyName("anonymous_id")]
|
||||
public string? AnonymousId { get; set; }
|
||||
|
||||
// Type = Conference
|
||||
|
||||
[JsonPropertyName("web_conference_id")]
|
||||
public ulong? WebConferenceId { get; set; }
|
||||
|
||||
// Type = Collaboration
|
||||
|
||||
[JsonPropertyName("collaboration_id")]
|
||||
public ulong? CollaborationId { get; set; }
|
||||
|
||||
// Type = AssignmentRequest
|
||||
|
||||
[JsonPropertyName("assignment_request_id")]
|
||||
public ulong? AssignmentRequestId { get; set; }
|
||||
|
||||
|
||||
}
|
||||
[property: JsonPropertyName("assignment_request_id")]
|
||||
ulong? AssignmentRequestId = null
|
||||
);
|
||||
@@ -2,17 +2,14 @@
|
||||
|
||||
|
||||
namespace CanvasModel.Users;
|
||||
public class ActivityStreamSummaryEntryModel
|
||||
{
|
||||
public record ActivityStreamSummaryEntryModel
|
||||
(
|
||||
[property: JsonPropertyName("type")]
|
||||
string Type,
|
||||
|
||||
[JsonPropertyName("type")]
|
||||
public string Type { get; set; }
|
||||
[property: JsonPropertyName("unread_count")]
|
||||
uint UnreadCount,
|
||||
|
||||
[JsonPropertyName("unread_count")]
|
||||
public uint UnreadCount { get; set; }
|
||||
|
||||
[JsonPropertyName("count")]
|
||||
public uint Count { get; set; }
|
||||
|
||||
|
||||
}
|
||||
[property: JsonPropertyName("count")]
|
||||
uint Count
|
||||
);
|
||||
@@ -1,15 +1,10 @@
|
||||
|
||||
|
||||
|
||||
namespace CanvasModel.Users;
|
||||
public class AnonymousUserDisplayModel
|
||||
{
|
||||
|
||||
[JsonPropertyName("anonymous_id")]
|
||||
public string AnonymousId { get; set; }
|
||||
public record AnonymousUserDisplayModel
|
||||
(
|
||||
[property: JsonPropertyName("anonymous_id")]
|
||||
string AnonymousId,
|
||||
|
||||
[JsonPropertyName("avatar_image_url")]
|
||||
public string AvatarImageUrl { get; set; }
|
||||
|
||||
|
||||
}
|
||||
[property: JsonPropertyName("avatar_image_url")]
|
||||
string AvatarImageUrl
|
||||
);
|
||||
@@ -1,33 +1,28 @@
|
||||
|
||||
|
||||
|
||||
namespace CanvasModel.Users;
|
||||
public class AvatarModel
|
||||
{
|
||||
|
||||
[JsonPropertyName("type")]
|
||||
public string Type { get; set; }
|
||||
public record AvatarModel
|
||||
(
|
||||
[property: JsonPropertyName("type")]
|
||||
string Type,
|
||||
|
||||
[JsonPropertyName("url")]
|
||||
public string Url { get; set; }
|
||||
[property: JsonPropertyName("url")]
|
||||
string Url,
|
||||
|
||||
[JsonPropertyName("token")]
|
||||
public string Token { get; set; }
|
||||
[property: JsonPropertyName("token")]
|
||||
string Token,
|
||||
|
||||
[JsonPropertyName("display_name")]
|
||||
public string DisplayName { get; set; }
|
||||
[property: JsonPropertyName("display_name")]
|
||||
string DisplayName,
|
||||
|
||||
[JsonPropertyName("id")]
|
||||
public ulong Id { get; set; }
|
||||
[property: JsonPropertyName("id")]
|
||||
ulong Id,
|
||||
|
||||
[JsonPropertyName("content_type")]
|
||||
public string ContentType { get; set; }
|
||||
[property: JsonPropertyName("content_type")]
|
||||
string ContentType,
|
||||
|
||||
[JsonPropertyName("filename")]
|
||||
public string Filename { get; set; }
|
||||
[property: JsonPropertyName("filename")]
|
||||
string Filename,
|
||||
|
||||
[JsonPropertyName("size")]
|
||||
public ulong Size { get; set; }
|
||||
|
||||
|
||||
}
|
||||
[property: JsonPropertyName("size")]
|
||||
ulong Size
|
||||
);
|
||||
@@ -1,18 +1,13 @@
|
||||
|
||||
|
||||
|
||||
namespace CanvasModel.Users;
|
||||
public class CourseNicknameModel
|
||||
{
|
||||
|
||||
[JsonPropertyName("course_id")]
|
||||
public ulong CourseId { get; set; }
|
||||
public record CourseNicknameModel
|
||||
(
|
||||
[property: JsonPropertyName("course_id")]
|
||||
ulong CourseId,
|
||||
|
||||
[JsonPropertyName("name")]
|
||||
public string Name { get; set; }
|
||||
[property: JsonPropertyName("name")]
|
||||
string Name,
|
||||
|
||||
[JsonPropertyName("nickname")]
|
||||
public string Nickname { get; set; }
|
||||
|
||||
|
||||
}
|
||||
[property: JsonPropertyName("nickname")]
|
||||
string Nickname
|
||||
);
|
||||
@@ -1,24 +1,19 @@
|
||||
|
||||
|
||||
|
||||
namespace CanvasModel.Users;
|
||||
public class PageViewLinksModel
|
||||
{
|
||||
|
||||
[JsonPropertyName("user")]
|
||||
public ulong User { get; set; }
|
||||
public record PageViewLinksModel
|
||||
(
|
||||
[property: JsonPropertyName("user")]
|
||||
ulong User,
|
||||
|
||||
[JsonPropertyName("context")]
|
||||
public ulong? Context { get; set; }
|
||||
[property: JsonPropertyName("context")]
|
||||
ulong? Context = null,
|
||||
|
||||
[JsonPropertyName("asset")]
|
||||
public ulong? Asset { get; set; }
|
||||
[property: JsonPropertyName("asset")]
|
||||
ulong? Asset = null,
|
||||
|
||||
[JsonPropertyName("real_user")]
|
||||
public ulong? RealUser { get; set; }
|
||||
[property: JsonPropertyName("real_user")]
|
||||
ulong? RealUser = null,
|
||||
|
||||
[JsonPropertyName("account")]
|
||||
public ulong? Account { get; set; }
|
||||
|
||||
|
||||
}
|
||||
[property: JsonPropertyName("account")]
|
||||
ulong? Account = null
|
||||
);
|
||||
@@ -1,58 +1,53 @@
|
||||
using System;
|
||||
|
||||
|
||||
|
||||
namespace CanvasModel.Users;
|
||||
public class PageViewModel
|
||||
{
|
||||
|
||||
[JsonPropertyName("id")]
|
||||
public string Id { get; set; }
|
||||
public record PageViewModel
|
||||
(
|
||||
|
||||
[JsonPropertyName("app_name")]
|
||||
public string AppName { get; set; }
|
||||
[property: JsonPropertyName("id")]
|
||||
string Id,
|
||||
|
||||
[JsonPropertyName("url")]
|
||||
public string Url { get; set; }
|
||||
[property: JsonPropertyName("app_name")]
|
||||
string AppName,
|
||||
|
||||
[JsonPropertyName("context_type")]
|
||||
public string ContextType { get; set; }
|
||||
[property: JsonPropertyName("url")]
|
||||
string Url,
|
||||
|
||||
[JsonPropertyName("asset_type")]
|
||||
public string AssetType { get; set; }
|
||||
[property: JsonPropertyName("context_type")]
|
||||
string ContextType,
|
||||
|
||||
[JsonPropertyName("controller")]
|
||||
public string Controller { get; set; }
|
||||
[property: JsonPropertyName("asset_type")]
|
||||
string AssetType,
|
||||
|
||||
[JsonPropertyName("action")]
|
||||
public string Action { get; set; }
|
||||
[property: JsonPropertyName("controller")]
|
||||
string Controller,
|
||||
|
||||
[JsonPropertyName("interaction_seconds")]
|
||||
public decimal? InteractionSeconds { get; set; }
|
||||
[property: JsonPropertyName("action")]
|
||||
string Action,
|
||||
|
||||
[JsonPropertyName("created_at")]
|
||||
public DateTime CreatedAt { get; set; }
|
||||
[property: JsonPropertyName("created_at")]
|
||||
DateTime CreatedAt,
|
||||
|
||||
[JsonPropertyName("user_request")]
|
||||
public bool? UserRequest { get; set; }
|
||||
[property: JsonPropertyName("links")]
|
||||
PageViewLinksModel Links,
|
||||
|
||||
[JsonPropertyName("render_time")]
|
||||
public double? RenderTime { get; set; }
|
||||
[property: JsonPropertyName("interaction_seconds")]
|
||||
decimal? InteractionSeconds = null,
|
||||
|
||||
[JsonPropertyName("user_agent")]
|
||||
public string UserAgent { get; set; }
|
||||
[property: JsonPropertyName("user_request")]
|
||||
bool? UserRequest = null,
|
||||
|
||||
[JsonPropertyName("participated")]
|
||||
public bool? Participated { get; set; }
|
||||
[property: JsonPropertyName("render_time")]
|
||||
double? RenderTime = null,
|
||||
|
||||
[JsonPropertyName("http_method")]
|
||||
public string HttpMethod { get; set; }
|
||||
[property: JsonPropertyName("user_agent")]
|
||||
string UserAgent = null,
|
||||
|
||||
[JsonPropertyName("remote_ip")]
|
||||
public string RemoteIp { get; set; }
|
||||
[property: JsonPropertyName("participated")]
|
||||
bool? Participated = null,
|
||||
|
||||
[JsonPropertyName("links")]
|
||||
public PageViewLinksModel Links { get; set; }
|
||||
[property: JsonPropertyName("http_method")]
|
||||
string HttpMethod = null,
|
||||
|
||||
|
||||
}
|
||||
[property: JsonPropertyName("remote_ip")]
|
||||
string RemoteIp = null
|
||||
);
|
||||
@@ -1,51 +1,46 @@
|
||||
|
||||
|
||||
|
||||
namespace CanvasModel.Users;
|
||||
public class ProfileModel
|
||||
{
|
||||
|
||||
[JsonPropertyName("id")]
|
||||
public ulong Id { get; set; }
|
||||
public record ProfileModel
|
||||
(
|
||||
[property: JsonPropertyName("id")]
|
||||
ulong Id,
|
||||
|
||||
[JsonPropertyName("name")]
|
||||
public string Name { get; set; }
|
||||
[property: JsonPropertyName("name")]
|
||||
string Name,
|
||||
|
||||
[JsonPropertyName("short_name")]
|
||||
public string ShortName { get; set; }
|
||||
[property: JsonPropertyName("short_name")]
|
||||
string ShortName,
|
||||
|
||||
[JsonPropertyName("sortable_name")]
|
||||
public string SortableName { get; set; }
|
||||
[property: JsonPropertyName("sortable_name")]
|
||||
string SortableName,
|
||||
|
||||
[JsonPropertyName("title")]
|
||||
public string Title { get; set; }
|
||||
[property: JsonPropertyName("title")]
|
||||
string Title,
|
||||
|
||||
[JsonPropertyName("bio")]
|
||||
public string Bio { get; set; }
|
||||
[property: JsonPropertyName("bio")]
|
||||
string Bio,
|
||||
|
||||
[JsonPropertyName("primary_email")]
|
||||
public string PrimaryEmail { get; set; }
|
||||
[property: JsonPropertyName("primary_email")]
|
||||
string PrimaryEmail,
|
||||
|
||||
[JsonPropertyName("login_id")]
|
||||
public string LoginId { get; set; }
|
||||
[property: JsonPropertyName("login_id")]
|
||||
string LoginId,
|
||||
|
||||
[JsonPropertyName("sis_user_id")]
|
||||
public string SisUserId { get; set; }
|
||||
[property: JsonPropertyName("sis_user_id")]
|
||||
string SisUserId,
|
||||
|
||||
[JsonPropertyName("lti_user_id")]
|
||||
public string LtiUserId { get; set; }
|
||||
[property: JsonPropertyName("lti_user_id")]
|
||||
string LtiUserId,
|
||||
|
||||
[JsonPropertyName("avatar_url")]
|
||||
public string AvatarUrl { get; set; }
|
||||
[property: JsonPropertyName("avatar_url")]
|
||||
string AvatarUrl,
|
||||
|
||||
[JsonPropertyName("calendar")]
|
||||
public object Calendar { get; set; }
|
||||
[property: JsonPropertyName("calendar")]
|
||||
object Calendar,
|
||||
|
||||
[JsonPropertyName("time_zone")]
|
||||
public string TimeZone { get; set; }
|
||||
[property: JsonPropertyName("time_zone")]
|
||||
string TimeZone,
|
||||
|
||||
[JsonPropertyName("locale")]
|
||||
public string Locale { get; set; }
|
||||
|
||||
|
||||
}
|
||||
[property: JsonPropertyName("locale")]
|
||||
string Locale
|
||||
);
|
||||
@@ -1,18 +1,17 @@
|
||||
|
||||
|
||||
namespace CanvasModel.Users;
|
||||
public class ShortUserModel
|
||||
{
|
||||
|
||||
[JsonPropertyName("id")]
|
||||
public ulong Id { get; set; }
|
||||
public record ShortUserModel
|
||||
(
|
||||
|
||||
[JsonPropertyName("display_name")]
|
||||
public string DisplayName { get; set; }
|
||||
[property: JsonPropertyName("id")]
|
||||
ulong Id,
|
||||
|
||||
[JsonPropertyName("avatar_image_url")]
|
||||
public string AvatarImageUrl { get; set; }
|
||||
[property: JsonPropertyName("display_name")]
|
||||
string DisplayName,
|
||||
|
||||
[JsonPropertyName("html_url")]
|
||||
public string HtmlUrl { get; set; }
|
||||
}
|
||||
[property: JsonPropertyName("avatar_image_url")]
|
||||
string AvatarImageUrl,
|
||||
|
||||
[property: JsonPropertyName("html_url")]
|
||||
string HtmlUrl
|
||||
);
|
||||
|
||||
@@ -1,29 +1,25 @@
|
||||
|
||||
|
||||
|
||||
|
||||
namespace CanvasModel.Users;
|
||||
public class UserDisplayModel
|
||||
{
|
||||
|
||||
[JsonPropertyName("id")]
|
||||
public ulong? Id { get; set; }
|
||||
public record UserDisplayModel
|
||||
(
|
||||
[property: JsonPropertyName("avatar_image_url")]
|
||||
string AvatarImageUrl,
|
||||
|
||||
[JsonPropertyName("short_name")]
|
||||
public string? ShortName { get; set; }
|
||||
[property: JsonPropertyName("html_url")]
|
||||
string HtmlUrl,
|
||||
|
||||
[JsonPropertyName("display_name")]
|
||||
public string? DisplayName { get; set; }
|
||||
[property: JsonPropertyName("id")]
|
||||
ulong? Id = null,
|
||||
|
||||
[JsonPropertyName("avatar_image_url")]
|
||||
public string AvatarImageUrl { get; set; }
|
||||
[property: JsonPropertyName("short_name")]
|
||||
string? ShortName = null,
|
||||
|
||||
[JsonPropertyName("html_url")]
|
||||
public string HtmlUrl { get; set; }
|
||||
[property: JsonPropertyName("display_name")]
|
||||
string? DisplayName = null,
|
||||
|
||||
[JsonPropertyName("pronouns")]
|
||||
public string? Pronouns { get; set; }
|
||||
[property: JsonPropertyName("pronouns")]
|
||||
string? Pronouns = null,
|
||||
|
||||
[JsonPropertyName("anonymous_id")]
|
||||
public string AnonymousId { get; set; }
|
||||
}
|
||||
[property: JsonPropertyName("anonymous_id")]
|
||||
string AnonymousId = null
|
||||
);
|
||||
@@ -1,59 +1,56 @@
|
||||
using CanvasModel.Enrollments;
|
||||
|
||||
namespace CanvasModel.Users;
|
||||
public class UserModel
|
||||
{
|
||||
public record UserModel
|
||||
(
|
||||
[property: JsonPropertyName("id")]
|
||||
ulong Id,
|
||||
|
||||
[JsonPropertyName("id")]
|
||||
public ulong Id { get; set; }
|
||||
[property: JsonPropertyName("name")]
|
||||
string Name,
|
||||
|
||||
[JsonPropertyName("name")]
|
||||
public string Name { get; set; }
|
||||
[property: JsonPropertyName("sortable_name")]
|
||||
string SortableName,
|
||||
|
||||
[JsonPropertyName("sortable_name")]
|
||||
public string SortableName { get; set; }
|
||||
[property: JsonPropertyName("short_name")]
|
||||
string ShortName,
|
||||
|
||||
[JsonPropertyName("short_name")]
|
||||
public string ShortName { get; set; }
|
||||
[property: JsonPropertyName("sis_user_id")]
|
||||
string SisUserId,
|
||||
|
||||
[JsonPropertyName("sis_user_id")]
|
||||
public string SisUserId { get; set; }
|
||||
[property: JsonPropertyName("integration_id")]
|
||||
string IntegrationId,
|
||||
|
||||
[JsonPropertyName("sis_import_id")]
|
||||
public ulong? SisImportId { get; set; }
|
||||
[property: JsonPropertyName("login_id")]
|
||||
string LoginId,
|
||||
|
||||
[JsonPropertyName("integration_id")]
|
||||
public string IntegrationId { get; set; }
|
||||
[property: JsonPropertyName("avatar_url")]
|
||||
string AvatarUrl,
|
||||
|
||||
[JsonPropertyName("login_id")]
|
||||
public string LoginId { get; set; }
|
||||
[property: JsonPropertyName("enrollments")]
|
||||
List<EnrollmentModel> Enrollments,
|
||||
|
||||
[JsonPropertyName("avatar_url")]
|
||||
public string AvatarUrl { get; set; }
|
||||
[property: JsonPropertyName("email")]
|
||||
string Email,
|
||||
|
||||
[JsonPropertyName("enrollments")]
|
||||
public List<EnrollmentModel> Enrollments { get; set; }
|
||||
[property: JsonPropertyName("locale")]
|
||||
string Locale,
|
||||
|
||||
[JsonPropertyName("email")]
|
||||
public string Email { get; set; }
|
||||
[property: JsonPropertyName("effective_locale")]
|
||||
string EffectiveLocale,
|
||||
|
||||
[JsonPropertyName("locale")]
|
||||
public string Locale { get; set; }
|
||||
[property: JsonPropertyName("time_zone")]
|
||||
string TimeZone,
|
||||
|
||||
[JsonPropertyName("effective_locale")]
|
||||
public string EffectiveLocale { get; set; }
|
||||
[property: JsonPropertyName("bio")]
|
||||
string Bio,
|
||||
|
||||
[JsonPropertyName("last_login")]
|
||||
public DateTime? LastLogin { get; set; }
|
||||
[property: JsonPropertyName("permissions")]
|
||||
Dictionary<string, bool> Permissions,
|
||||
|
||||
[JsonPropertyName("time_zone")]
|
||||
public string TimeZone { get; set; }
|
||||
[property: JsonPropertyName("sis_import_id")]
|
||||
ulong? SisImportId = null,
|
||||
|
||||
[JsonPropertyName("bio")]
|
||||
public string Bio { get; set; }
|
||||
|
||||
[JsonPropertyName("permissions")]
|
||||
public Dictionary<string, bool> Permissions { get; set; }
|
||||
|
||||
|
||||
}
|
||||
[property: JsonPropertyName("last_login")]
|
||||
DateTime? LastLogin = null
|
||||
);
|
||||
Reference in New Issue
Block a user