using System;
using DatabaseEditor.BL.Attributes;

namespace DatabaseEditor.BL.Models
{
    public class AuthorListModel : ItemModelBase, IEquatable<AuthorListModel>
    {
        [SearchableProperty]
        public string Name { get; set; }

        [SearchableProperty]
        public string Surname { get; set; }

        public bool Equals(AuthorListModel other)
        {
            if (other == null) return false;
            if (this.Name == other.Name &&
                this.Surname == other.Surname &&
                this.Id == other.Id)
                return true;
            return false;
        }
    }
}
