Skip to content

Commit

Permalink
Merge pull request #14 from kzi-nastava/origin/feat/Tutor
Browse files Browse the repository at this point in the history
[Add] Tutor Class to Model
  • Loading branch information
darinkaloncar authored Mar 28, 2024
2 parents bac44fa + 1c314bf commit a83d6fb
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
1 change: 1 addition & 0 deletions LangLang/Core/Model/Profile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ public Profile(string name, string lastName, UserGender gender, DateTime dateOfB
Password = password;
Role = role;
}
public Profile() { }

Check warning on line 82 in LangLang/Core/Model/Profile.cs

View workflow job for this annotation

GitHub Actions / build

Non-nullable field 'name' must contain a non-null value when exiting constructor. Consider declaring the field as nullable.

Check warning on line 82 in LangLang/Core/Model/Profile.cs

View workflow job for this annotation

GitHub Actions / build

Non-nullable field 'lastName' must contain a non-null value when exiting constructor. Consider declaring the field as nullable.

Check warning on line 82 in LangLang/Core/Model/Profile.cs

View workflow job for this annotation

GitHub Actions / build

Non-nullable field 'phoneNumber' must contain a non-null value when exiting constructor. Consider declaring the field as nullable.

Check warning on line 82 in LangLang/Core/Model/Profile.cs

View workflow job for this annotation

GitHub Actions / build

Non-nullable field 'email' must contain a non-null value when exiting constructor. Consider declaring the field as nullable.

Check warning on line 82 in LangLang/Core/Model/Profile.cs

View workflow job for this annotation

GitHub Actions / build

Non-nullable field 'password' must contain a non-null value when exiting constructor. Consider declaring the field as nullable.

}
}
48 changes: 48 additions & 0 deletions LangLang/Core/Model/Tutor.cs
Original file line number Diff line number Diff line change
@@ -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<Course> GetCourses(ref Dictionary<int, Course> courses)
{
}
*/
//GetExamSlots takes hashmap of all examslots and returns list of examslots that this tutor created
/*
public List<ExamSlot> GetExamSlots(ref Dictionary<int, ExamSlot> examSlots)
{
List<ExamSlot> examSlotList = new List<ExamSlot>();
foreach (KeyValuePair<int, ExamSlot> pair in examSlots)
{
if (pair.Value.Course.Tutor.Profile.Email == Profile.Email)
{
examSlotList.Add(pair.Value);
}
}
return examSlotList;
}
*/
//add searchCourses and searchExamSlots
}
}

0 comments on commit a83d6fb

Please sign in to comment.