Skip to content
This repository was archived by the owner on Jan 21, 2022. It is now read-only.

Commit c8b71a8

Browse files
Merge pull request #9 from Standaard-boos/profile-branch
Profile branch
2 parents 7a1ada1 + 66f7905 commit c8b71a8

13 files changed

Lines changed: 249 additions & 1 deletion

Model/BlockList.cs

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
5+
namespace Model
6+
{
7+
public class BlockList
8+
{
9+
10+
private List<Student> BlockedStudents { get; set; }
11+
private Student Student;
12+
13+
public BlockList(Student student)
14+
{
15+
Student = student;
16+
BlockedStudents = new List<Student>();
17+
//update list according to database
18+
}
19+
20+
public void AddBlock(Student student)
21+
{
22+
BlockedStudents.Add(student);
23+
//database update
24+
}
25+
26+
public void RemoveBlock(Student student)
27+
{
28+
BlockedStudents.Remove(student);
29+
//database update
30+
}
31+
32+
public bool IsBlocked(Student student)
33+
{
34+
return BlockedStudents.Contains(student);
35+
}
36+
37+
}
38+
}

Model/InterestsData.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
5+
namespace Model
6+
{
7+
public class InterestsData
8+
{
9+
10+
public InterestsData(Student student)
11+
{
12+
13+
}
14+
15+
}
16+
}

Model/Match.cs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
5+
namespace Model
6+
{
7+
public class Match
8+
{
9+
10+
private Student Student1 { get; set; }
11+
private Student Student2 { get; set; }
12+
private Relationships RelationshipsType { get; set; }
13+
14+
public Match(Student student1, Student student2, Relationships relationshipsType)
15+
{
16+
Student1 = student1;
17+
Student2 = Student2;
18+
RelationshipsType = relationshipsType;
19+
}
20+
21+
}
22+
}

Model/MatchList.cs

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
5+
namespace Model
6+
{
7+
class MatchList
8+
{
9+
10+
private HashSet<Match> Matches { get; set; }
11+
private Student Student;
12+
13+
public MatchList(Student student)
14+
{
15+
Student = student;
16+
UpdateMatches();
17+
//store all local matches here
18+
}
19+
20+
public void UpdateMatches()
21+
{
22+
//get all matches from database
23+
//add them in Matches hashset
24+
Matches = new HashSet<Match>();
25+
}
26+
27+
public void AddMatch(Match match)
28+
{
29+
//update database
30+
Matches.Add(match);
31+
}
32+
33+
public void RemoveMatch(Match match)
34+
{
35+
Matches.Remove(match);
36+
}
37+
38+
public Boolean IsMatch(Match match)
39+
{
40+
return Matches.Contains(match);
41+
}
42+
43+
}
44+
}

Model/Media.cs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
5+
namespace Model
6+
{
7+
8+
public class Media
9+
{
10+
11+
private List<Picture> Pictures { get; set; }
12+
private Student Student;
13+
14+
public Media(Student student)
15+
{
16+
Student = student;
17+
//set picture data
18+
}
19+
20+
}
21+
}

Model/MoralsData.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
5+
namespace Model
6+
{
7+
public class MoralsData
8+
{
9+
10+
public MoralsData(Student student)
11+
{
12+
13+
}
14+
15+
}
16+
}

Model/Picture.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
5+
namespace Model
6+
{
7+
class Picture
8+
{
9+
}
10+
}

Model/Profile.cs

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
5+
namespace Model
6+
{
7+
public class Profile
8+
{
9+
10+
private Student Student { get; set; }
11+
private QAData QAData { get; set; }
12+
private MoralsData MoralsData { get; set; }
13+
private InterestsData InterestsData { get; set; }
14+
private string Description { get; set; }
15+
private Media Media { get; set; }
16+
private MatchList MatchList { get; set; }
17+
private BlockList BlockList { get; set; }
18+
19+
public Profile(Student student)
20+
{
21+
Student = student;
22+
QAData = new QAData(student);
23+
MoralsData = new MoralsData(student);
24+
InterestsData = new InterestsData(student);
25+
Media = new Media(student);
26+
MatchList = new MatchList(student);
27+
BlockList = new BlockList(student);
28+
Description = ""; //get description from db
29+
30+
}
31+
32+
}
33+
}

Model/ProfilePicture.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
5+
namespace Model
6+
{
7+
class ProfilePicture : Picture
8+
{
9+
}
10+
}

Model/QAData.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
5+
namespace Model
6+
{
7+
public class QAData
8+
{
9+
10+
public QAData(Student student)
11+
{
12+
13+
}
14+
15+
16+
}
17+
}

0 commit comments

Comments
 (0)