using System.Collections.Generic;
using System.Linq;

namespace ListLabelObjects.Models
{
    internal class Person
    {
        public string FirstName { get; set; }
        public string LastName { get; set; }

        public List<Project> Projects { get; set; } = new List<Project>();

        public double WorkingHours => Projects?.Sum(p => p.WorkingHoursDuration) ?? 0.0;
    }
}
