using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DataAccessLayer.Entities
{
    public class User : EntityBase
    {
        [ForeignKey(nameof(Employee))]
        public new int Id { get; set; }
        [Required]
        [StringLength(20)]
        public string Login { get; set; }
        [Required]
        [StringLength(100)]
        public string PasswordHash { get; set; }
        public virtual ICollection<Role> Roles { get; set; }
        public virtual Employee Employee { get; set; }
    }
}
