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;
using Domain.IdentityModels;

namespace Domain.Contacts
{
    public class Person
    {
        public int PersonId { get; set; }
        [MaxLength(128)]
        public string FirstName { get; set; }
        [MaxLength(128)]
        public string LastName { get; set; }

        [MaxLength(128)]
        public string UserId { get; set; }
        public User User { get; set; }

        public ICollection<Contact> Contacts { get; set; }

        [NotMapped]
        public string FirstLastName {
            get { return FirstName + " " + LastName; }
        }
        [NotMapped]
        public string LastFirstName {
            get { return LastName + " " + FirstName; }
        }
    }
}
