using CommunityToolkit.Mvvm.ComponentModel;
using SQLite;

namespace GreadyPoang.EntityLayer;
[Table("Participants")]
public partial class Participant : ObservableObject
{
    public Participant()
    {
        FirstName = string.Empty;
        LastName = string.Empty;
        Email = string.Empty;
    }

    [ObservableProperty]
    [property: PrimaryKey, AutoIncrement, Column("ParticipantId")]
    private int participantId;

    [ObservableProperty]
    [property: Column("FirstName")]
    private string firstName;

    [ObservableProperty]
    [property: Column("LastName")]
    private string lastName;

    [ObservableProperty]
    [property: Column("Email")]
    private string email;

    public string FullName
    {
        get { return $"{FirstName} {LastName}"; }
    }

    public string LastNameFirstName
    {
        get { return $"{LastName}, {FirstName}"; }
    }
}
