Skip to content
Snippets Groups Projects
SensorValue.cs 871 B
Newer Older
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace Public_API.Shared.Models
{
    public class SensorValue
    {
        [Key]
        public int valueID { get; set; }
        public DateTime dateTime { get; set; }
        public int sensorID { get; set; }
        public decimal temperature { get; set; }
        public decimal humidity { get; set; }
        public decimal co2 { get; set; }
        public decimal ppm25 { get; set; }

        public SensorValue(int sensorID, decimal temperature, decimal humidity, decimal co2, decimal ppm25)
        {
            this.sensorID = sensorID;
            this.temperature = temperature;
            this.humidity = humidity;
            this.co2 = co2;
            this.ppm25 = ppm25;

            this.dateTime = DateTime.Now;
        }
    }
}