using Library;
using MirDB;

namespace Server.DBModels
{
    public sealed class SafeZoneInfo : DBObject
    {
        [Association("SafeZones")]
        public MapInfo Map
        {
            get { return _Map; }
            set
            {
                if (_Map == value) return;

                var oldValue = _Map;
                _Map = value;

                OnChanged(oldValue, value, "Map");
            }
        }
        private MapInfo _Map;

        public int X
        {
            get { return _X; }
            set
            {
                if (_X == value) return;

                var oldValue = _X;
                _X = value;

                OnChanged(oldValue, value, "X");
            }
        }
        private int _X;

        public int Y
        {
            get { return _Y; }
            set
            {
                if (_Y == value) return;

                var oldValue = _Y;
                _Y = value;

                OnChanged(oldValue, value, "Y");
            }
        }
        private int _Y;

        public int Size
        {
            get { return _Size; }
            set
            {
                if (_Size == value) return;

                var oldValue = _Size;
                _Size = value;

                OnChanged(oldValue, value, "Size");
            }
        }
        private int _Size;

        public bool BindPoint
        {
            get { return _BindPoint; }
            set
            {
                if (_BindPoint == value) return;

                var oldValue = _BindPoint;
                _BindPoint = value;

                OnChanged(oldValue, value, "BindPoint");
            }
        }
        private bool _BindPoint;

        public RequiredClass StartClass
        {
            get { return _StartClass; }
            set
            {
                if (_StartClass == value) return;

                var oldValue = _StartClass;
                _StartClass = value;

                OnChanged(oldValue, value, "StartClass");
            }
        }
        private RequiredClass _StartClass;

    }
}
