using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace EfCoreMigration.Models
{
    public class Evenement
    {
        [Key]
        [Column("ID")]
        public int Id { get; set; }
        [Required]
        public string Naam { get; set; }
        [Required]
        public string Plaats { get; set; }
        [Required]
        public int Afstand { get; set; }

        [DataType(DataType.Date)]
        public DateTime Datum { get; set; }

        public List<Deelname> Deelnemers { get; } = new List<Deelname>();
    }
}
