76 lines
1.5 KiB
C#
76 lines
1.5 KiB
C#
using Common.Library;
|
|
using SQLite;
|
|
|
|
namespace Gready_Poang.EntityLayer;
|
|
[Table("Participants")]
|
|
public class Participant : EntityBase
|
|
{
|
|
public Participant()
|
|
{
|
|
_firstName = string.Empty;
|
|
_lastName = string.Empty;
|
|
_email = string.Empty;
|
|
}
|
|
|
|
private int _participantId;
|
|
private string _firstName;
|
|
private string _lastName;
|
|
private string _email;
|
|
|
|
[PrimaryKey]
|
|
[AutoIncrement]
|
|
[Column("ParticipantId")]
|
|
public int ParticipantId
|
|
{
|
|
get { return _participantId; }
|
|
set
|
|
{
|
|
_participantId = value;
|
|
RaisePropertyChanged(nameof(ParticipantId));
|
|
}
|
|
}
|
|
|
|
[Column("FirstName")]
|
|
public string FirstName
|
|
{
|
|
get { return _firstName; }
|
|
set
|
|
{
|
|
_firstName = value;
|
|
RaisePropertyChanged(nameof(FirstName));
|
|
}
|
|
}
|
|
|
|
[Column("LastName")]
|
|
public string LastName
|
|
{
|
|
get { return _lastName; }
|
|
set
|
|
{
|
|
_lastName = value;
|
|
RaisePropertyChanged(nameof(LastName));
|
|
}
|
|
}
|
|
|
|
[Column("Email")]
|
|
public string Email
|
|
{
|
|
get { return _email; }
|
|
set
|
|
{
|
|
_email = value;
|
|
RaisePropertyChanged(nameof(Email));
|
|
}
|
|
}
|
|
|
|
public string FullName
|
|
{
|
|
get { return $"{FirstName} {LastName}"; }
|
|
}
|
|
|
|
public string LastNameFirstName
|
|
{
|
|
get { return $"{LastName}, {FirstName}"; }
|
|
}
|
|
}
|