using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SlnMesnac.WPF.Model
{
    public class SenorInfo : INotifyPropertyChanged
    {
        /// <summary>
        /// 备  注:
        /// 默认值:
        ///</summary>
        public string Sensorid { get; set; } = null!;

        /// <summary>
        /// 备  注:
        /// 默认值:
        ///</summary>
        public string Combineid { get; set; } = null!;

        /// <summary>
        /// 备  注:
        /// 默认值:
        ///</summary>
        public string? Name { get; set; }

        /// <summary>
        /// 备  注:
        /// 默认值:
        ///</summary>
        public decimal? Sensorser { get; set; }

        /// <summary>
        /// 备  注:
        /// 默认值:
        ///</summary>
        public decimal? Sensortypeid { get; set; }

        /// <summary>
        /// 备  注:
        /// 默认值:
        ///</summary>
        public string? Deviceid { get; set; }

        /// <summary>
        /// 备  注:
        /// 默认值:
        ///</summary>
        public decimal? Readinterval { get; set; }

        private string _readtime;

        public string Readtime
        {
            get { return _readtime; }
            set
            {
                if (_readtime != value)
                {
                    _readtime = value;
                    OnPropertyChanged(nameof(Readtime));
                }
            }
        }
        private string _readdata;

        public string Readdata
        {
            get { return _readdata; }
            set
            {
                if (_readdata != value)
                {
                    _readdata = value;
                    OnPropertyChanged(nameof(Readdata));
                }
            }
        }


        public event PropertyChangedEventHandler? PropertyChanged;

        protected virtual void OnPropertyChanged(string propertyName)
        {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
        }
    }
}