Answer the question
In order to leave comments, you need to log in
What is the best way to implement student and group scheduling in MongoDB?
We are developing a CRM system for an online school and it became necessary to redesign / make sure that the schedule scheme is correct.
There are two main collections in the database - students and groups. When we create a schedule for a group, a copy of it is added to all its students (so that you can pay for the days for each separately).
The schedule looks like this:
export class Schedule {
@prop({ type: Boolean, required: false })
paid: boolean;
@prop({ type: String, required: false })
tutor: string;
@prop({ type: String })
date: string;
@prop({ type: () => [String] })
duration: string[];
@prop({ type: Number, required: false, default: 2 })
status: number;
@prop({ type: String })
message: string;
@prop({ type: String, required: false })
start: string;
@prop({ type: String, required: false })
finish: string;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question