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

namespace FMSAdmin.Entities
{
    public partial class CmPatrolGroup
    {
        public CmPatrolGroup()
        {
            CmPatrolGroupUser = new HashSet<CmPatrolGroupUser>();
            CmPatrolPlan = new HashSet<CmPatrolPlan>();
        }

        [Key]
        public int SiteId { get; set; }
        [Key]
        public int PatrolGroupId { get; set; }
        [Required]
        [StringLength(48)]
        public string Name { get; set; }

        [ForeignKey(nameof(SiteId))]
        [InverseProperty(nameof(CmSite.CmPatrolGroup))]
        public virtual CmSite Site { get; set; }
        [InverseProperty("CmPatrolGroup")]
        public virtual ICollection<CmPatrolGroupUser> CmPatrolGroupUser { get; set; }
        [InverseProperty("CmPatrolGroup")]
        public virtual ICollection<CmPatrolPlan> CmPatrolPlan { get; set; }
    }
}
