﻿using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using ForumSystem.Data.Models.Constants;

namespace ForumSystem.Data.Models
{
    public class Country
    {
        public Country()
        {
            Cities = new HashSet<City>();
        }

        public int Id { get; set; }

        [Required]
        [MaxLength(ModelConstants.CountryNameMaxLength)]
        public string Name { get; set; }

        public ICollection<City> Cities { get; set; }
    }
}