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

namespace WpfApp
{
    [Table("Users")]
    public class Users
    {
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int Id { get; set; }
        [Column(TypeName = "nvarchar (50)")]
        [Required(ErrorMessage = "Имя не может быть пустым")]
        public string FirstName { get; set; }
        [Column(TypeName = "nvarchar (50)")]
        [Required(ErrorMessage = "Фамилия не может быть пустым")]
        public string LastName {get; set;}
        public string MiddleName { get; set; }
        [Phone]
        [Column(TypeName = "nvarchar (12)")]
        [Required(ErrorMessage = "Телефон не может быть пустым")]
        public string Phone { get; set; }
        public DateTime BirthDate { get; set; }
        public DateTime StartWork { get; set; }
        public string AchievementDescription { get; set; }
        [Required]
        public int IdRole { get; set; }
        [ForeignKey("IdRole")]
        public Role Role { get; set; }

    }
}
