@leonardmensah I can't remember if we decided on a schema for Member assignments. Here's two options I came up with. Both work. The second one seems "more right" to me but I can't quite place my finger on why.
{
kind: "Assignment",
resourceId: <% Resource _id %>,
createdBy: <% Member _id %>,
startDate: <% Unix timestamp %>,
endDate: <% Unix timestamp %>,
targetDate: <% Unix timestamp %>
context: {
subject: "English",
use: "Video book", // or Stories for Week, or Lesson
groupId: <% Group _id %>,
memberId: <% Member _id %>,
facilityId: <% Facility _id %>
}
configuration: {
questions: [<% Question _id %>, <% Question _id %>, ...]
}
}
{
kind: "Assignment",
resourceId: <% Resource _id %>,
createdBy: <% Member _id %>,
startDate: <% Unix timestamp %>,
endDate: <% Unix timestamp %>,
targetDate: <% Unix timestamp %>
context: {
subject: "English",
use: "Video book", // or Stories for Week, or Lesson
targetId: <% Group _id || Member _id %>,
targetKind: <% "Group" || "Member" %>,
facilityId: <% Facility _id %>
}
configuration: {
questions: [<% Question _id %>, <% Question _id %>, ...]
}
}
@leonardmensah I can't remember if we decided on a schema for Member assignments. Here's two options I came up with. Both work. The second one seems "more right" to me but I can't quite place my finger on why.