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

namespace Entities.Contracts
{
    [Table("grades")]
    public class Grade
    {
        [Key]
        [Column("grade_id")]
        public int GradeId { get; set; }

        [Column("school_id")]
        public int SchoolId { get; set; }
        public School School { get; set; }

        [Column("grade_name")]
        [MaxLength(20)]
        public string GradeName { get; set; }

        [Column("grade_level")]
        public int GradeLevel { get; set; }

        // Navigation Properties
        public ICollection<Class> Classes { get; set; }

        public Grade()
        {
            Classes = new HashSet<Class>();
        }
    }
}
