using API.Models.Internal.Altersgruppen;
using System.ComponentModel.DataAnnotations;

namespace API.Models.Ingoing.Altersgruppen
{
    public class AltersGruppeIngoing
    {
        [Required]
        public string Name { get; set; }
        [Required]
        public int StartingAge { get; set; }
        [Required]
        public int EndingAge { get; set; }
    }

    public static class AltersgruppeMapper
    {
        public static AltersGruppe ToInternalFromIngoing(this AltersGruppeIngoing group)
        {
            return new AltersGruppe
            {
                Name = group.Name,
                StartingAge = group.StartingAge,
                EndingAge = group.EndingAge,
            };
        }
    }
}
