namespace BeWo.Data.Entities
{
    public class AdditionalServiceRegion : BeWoEntityBase
    {
        public static string PropertyName_Name = "Name";
        
        public static string PropertyName_AdditionalServiceOid = "AdditionalServiceOid";


        private string _Name;

        private long? _AdditionalServiceOid;

        private AdditionalService _AdditionalService;


        public virtual string Name
        {
            get { return _Name; }

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

        public virtual long? AdditionalServiceOid
        {
            get { return _AdditionalServiceOid; }

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

        public virtual AdditionalService AdditionalService
        {
            get { return _AdditionalService; }

            set
            {
                if (!AreDifferent(_AdditionalService, value))
                    return;
                _AdditionalService = value;
                AdditionalServiceOid = _AdditionalServiceOid != null ? _AdditionalService.Oid : null;
            }
        }
    }
}
