Skip to content

Commit

Permalink
Merge pull request #63 from kzi-nastava/feat/Director-model
Browse files Browse the repository at this point in the history
Add Director model class
  • Loading branch information
anasinik authored Mar 30, 2024
2 parents 32d9998 + 963a79a commit c9e089b
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions LangLang/Core/Model/Director.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
using System;
using LangLang.Core.Repository.Serialization;

namespace LangLang.Core.Model
{
class Director : ISerializable
{

private Profile _profile;

public Profile Profile
{
get {return _profile;}
set { _profile = value;}
}

public Director(int id, string name, string lastName, UserGender gender, DateTime dateOfBirth, string phoneNumber, string email, string password, UserType role) {
_profile = new Profile(id, name, lastName, gender, dateOfBirth, phoneNumber, email, password, role);
}

public string[] ToCSV()
{
string[] csvValues = { _profile.ToString() };
return csvValues;
}

public void FromCSV(string[] values)
{
try {
_profile = new Profile(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8]);
} catch {
throw;
}
}

public int Id
{
get { return Profile.Id; }
}
}
}

0 comments on commit c9e089b

Please sign in to comment.