using System.Collections.Generic;

using BS.Shared;

namespace BeWo.Data.Entities
{
    public class ValueListEntry : BeWoEntityBase
    {
        public static string PropertyName_Abbreviation = "Abbreviation";

        public static string PropertyName_ParentOid = "ParentOid";

        public static string PropertyName_Type = "Type";

        public static string PropertyName_Value = "Value";

        public static string PropertyName_ValueListEntry2Objects = "ValueListEntry2Objects";

        private string _Abbreviation;

        private long? _ParentOid;

        private ValueListEntryType _Type;

        private string _Value;

        private IList<ValueListEntry2Object> _ValueListEntry2Objects;

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

        public virtual string Abbreviation
        {
            get
            {
                return this._Abbreviation;
            }

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

        public virtual long? ParentOid
        {
            get
            {
                return _ParentOid;
            }

            set
            {
                if (AreDifferent(_ParentOid, value))
                {
                    _ParentOid = value;
                }
            }
        }

        public virtual ValueListEntryType Type
        {
            get
            {
                return this._Type;
            }

            set
            {
                if (this._Type != value)
                {
                    this._Type = value;
                }
            }
        }

        public virtual string Value
        {
            get
            {
                return this._Value;
            }

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

        public virtual IList<ValueListEntry2Object> ValueListEntry2Objects
        {
            get
            {
                return this._ValueListEntry2Objects ?? new List<ValueListEntry2Object>();
            }

            set
            {
                this._ValueListEntry2Objects = value;
            }
        }
    }
}