using System.Collections.Generic;

using BS.Shared;

namespace BeWo.Data.Entities
{
    public class Organisation2Person : BeWoEntityBase
    {
        public static string PropertyName_Contacts = "Contacts";

        public static string PropertyName_Organisation = "Organisation";

        public static string PropertyName_ValueList = "ValueList";

        private IList<Contact> _Contacts;

        private Organisation _Organisation;

        private Person _Person;

        public Organisation2Person()
        {
            this._Tid = TableID.Organisation2Person;
        }

        public virtual IList<Contact> Contacts
        {
            get
            {
                return this._Contacts ?? (this._Contacts = new List<Contact>());
            }

            set
            {
                if (this.AreDifferent(this._Contacts, value))
                {
                    this._Contacts = value;
                }
            }
        }

        public virtual Organisation Organisation
        {
            get
            {
                return this._Organisation;
            }

            set
            {
                if (this.AreDifferent(this._Organisation, value))
                {
                    this._Organisation = value;
                }
            }
        }

        public virtual Person Person
        {
            get { return this._Person; }

            set
            {
                if (this.AreDifferent(this._Person, value))
                    this._Person = value;
            }
        }
    }
}