From 1c314bf6ed1b503105ea813f89cb5fb0450d4bed Mon Sep 17 00:00:00 2001 From: DusicaPesic <130140285+DusicaPesic@users.noreply.github.com> Date: Thu, 28 Mar 2024 23:22:24 +0100 Subject: [PATCH] [Add] Tutor Class to Model --- LangLang/Core/Model/Profile.cs | 1 + LangLang/Core/Model/Tutor.cs | 48 ++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 LangLang/Core/Model/Tutor.cs diff --git a/LangLang/Core/Model/Profile.cs b/LangLang/Core/Model/Profile.cs index ddf57ba6..f528d785 100644 --- a/LangLang/Core/Model/Profile.cs +++ b/LangLang/Core/Model/Profile.cs @@ -79,6 +79,7 @@ public Profile(string name, string lastName, UserGender gender, DateTime dateOfB Password = password; Role = role; } + public Profile() { } } } diff --git a/LangLang/Core/Model/Tutor.cs b/LangLang/Core/Model/Tutor.cs new file mode 100644 index 00000000..c86ffc4d --- /dev/null +++ b/LangLang/Core/Model/Tutor.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Input; +using LangLang.Core.Model; +namespace LangLang.Core.Model +{ + class Tutor + { + // Profile attribute of type Profile + private Profile Profile { get; set; } + + // Constructor + public Tutor() + { + Profile = new Profile(); + } + public Tutor(Profile profile) + { + Profile = profile; + } + /* + public List GetCourses(ref Dictionary courses) + { + } + */ + //GetExamSlots takes hashmap of all examslots and returns list of examslots that this tutor created + /* + public List GetExamSlots(ref Dictionary examSlots) + { + List examSlotList = new List(); + + foreach (KeyValuePair pair in examSlots) + { + if (pair.Value.Course.Tutor.Profile.Email == Profile.Email) + { + examSlotList.Add(pair.Value); + } + } + + return examSlotList; + } + */ + //add searchCourses and searchExamSlots + } +}