mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-26 07:38:33 -06:00
data types are better
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace CanvasModel;
|
||||
|
||||
public record CourseModule(
|
||||
[property: Required]
|
||||
[property: StringLength(50, ErrorMessage = "Name too long (50 character limit).")]
|
||||
string Name,
|
||||
IEnumerable<LocalAssignment>? Assignments = null
|
||||
)
|
||||
{
|
||||
[JsonInclude]
|
||||
public IEnumerable<LocalAssignment> Assignments = Assignments ?? new LocalAssignment[] { };
|
||||
}
|
||||
[property: JsonPropertyName("id")] ulong Id,
|
||||
[property: JsonPropertyName("name")] string Name
|
||||
// [property: JsonPropertyName("start_at")] DateTime StartAt,
|
||||
// [property: JsonPropertyName("end_at")] DateTime EndAt,
|
||||
// [property: JsonPropertyName("description")] string Description
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user