using ProjectItCompany.Entities.Enums;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ProjectItCompany.Entities;

public class Executor
{
    public int Id { get; private set; }
    public string FullName { get; private set; } = string.Empty;
    public DateTime DateOfBirth { get; private set; }
    public decimal HourlyRate {  get; private set; }
    public JobTitles JobTitles { get; private set; }
    
    public static Executor CreateEntity(int id, string fullName, DateTime dateOfBirth, decimal hourlyRate, JobTitles jobTitles)
    {
        return new Executor
        {
            Id = id,
            FullName = fullName ?? string.Empty,
            DateOfBirth = dateOfBirth,
            HourlyRate = hourlyRate,
            JobTitles = jobTitles
        };
    }
}
