﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using TimePunchAPI.Models;

namespace TimePunchAPI.ViewModels.Response
{
    public class ProjectTinyViewModel
    {
        public long Id { get; set; }
        public string Name { get; set; }
        public string Key { get; set; }

        public static ProjectTinyViewModel From(Project project)
        {
            if (project != null)
            {
                return new ProjectTinyViewModel()
                {
                    Name = project.Name,
                    Id = project.Id,
                    Key = project.Key
                };
            }

            return null;

        }
    }
}
