using Sevomin.Models.Helpers;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Sevomin.Models
{
    [Table("Avalin")]
    public class Avalin : User
    {
        [Required]
        public string CompanyName { get; set; }     
        
        [StringLength(12)]
        public string NationalId { get; set; }
        [StringLength(10)]
        public string RegisterId { get; set; }
        
        public string Address { get; set; }

        public string CompanyPhoneNumber { get; set; }

        [EmailValidation(ErrorMessage="ای میل معتبر نیست")]
        public string EMail { get; set; }

        public virtual ICollection<Job> Jobs { get; set; }

        public Avalin()
        {

        }

        public Avalin(string userName, string companyName) : base(userName)
        {
            this.CompanyName = companyName;
        }
    }
}
