Skip to content

Commit

Permalink
Merge pull request #8 from kzi-nastava/origin/feat/User
Browse files Browse the repository at this point in the history
[Add] Profile Class to Model
  • Loading branch information
DusicaPesic authored Mar 28, 2024
2 parents 84e3492 + 070b1b7 commit c699bc1
Show file tree
Hide file tree
Showing 3 changed files with 108 additions and 0 deletions.
84 changes: 84 additions & 0 deletions LangLang/Core/Model/Profile.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LangLang.Core.Model
{
class Profile
{
// Attributes
private string name;
private string lastName;
private UserGender gender;
private DateTime dateOfBirth;
private string phoneNumber;
private string email;
private string password;
private UserType role;

// Properties
public string Name
{
get { return name; }
set { name = value; }
}

public string LastName
{
get { return lastName; }
set { lastName = value; }
}

public UserGender Gender
{
get { return gender; }
set { gender = value; }
}

public DateTime DateOfBirth
{
get { return dateOfBirth; }
set { dateOfBirth = value; }
}

public string PhoneNumber
{
get { return phoneNumber; }
set { phoneNumber = value; }
}

public string Email
{
get { return email; }
set { email = value; }
}

public string Password
{
get { return password; }
set { password = value; }
}

public UserType Role
{
get { return role; }
set { role = value; }
}

// Constructor
public Profile(string name, string lastName, UserGender gender, DateTime dateOfBirth, string phoneNumber, string email, string password, UserType role)

Check warning on line 71 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 71 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 71 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 71 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 71 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.

Check warning on line 71 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 71 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 71 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 71 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 71 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.
{
Name = name;
LastName = lastName;
Gender = gender;
DateOfBirth = dateOfBirth;
PhoneNumber = phoneNumber;
Email = email;
Password = password;
Role = role;
}

}
}
14 changes: 14 additions & 0 deletions LangLang/Core/Model/UserGender.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LangLang.Core.Model
{
public enum UserGender
{
Male,
Female
}
}
10 changes: 10 additions & 0 deletions LangLang/Core/Model/UserType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

namespace LangLang.Core.Model
{
public enum UserType
{
Student,
Tutor,
Director
}
}

0 comments on commit c699bc1

Please sign in to comment.