mirror of
https://github.com/fergalmoran/retns-api.git
synced 2025-12-22 18:10:47 +00:00
31 lines
943 B
C#
31 lines
943 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using MongoDB.Bson;
|
|
using MongoDB.Bson.Serialization.Attributes;
|
|
using MongoDB.Bson.Serialization.Options;
|
|
|
|
namespace retns.api.Data.Models {
|
|
public class HomeworkWeek {
|
|
public HomeworkWeek(string id) {
|
|
this.Id = id;
|
|
this.Days = new Dictionary<DayOfWeek, Dictionary<string, string>>();
|
|
}
|
|
[BsonId]
|
|
[BsonRepresentation(BsonType.String)]
|
|
public string Id { get; set; }
|
|
|
|
[BsonElement("WeekCommencing")]
|
|
public DateTime WeekCommencing { get; set; }
|
|
|
|
[BsonElement("WeekCNotesommencing")]
|
|
public string Notes { get; set; }
|
|
|
|
[BsonElement("Subjects")]
|
|
public List<string> Subjects;
|
|
|
|
[BsonElement("Days")]
|
|
[BsonDictionaryOptions(DictionaryRepresentation.ArrayOfArrays)]
|
|
public Dictionary<DayOfWeek, Dictionary<string, string>> Days { get; set; }
|
|
}
|
|
}
|