Major rewrite

This commit is contained in:
programmingPug
2025-01-14 14:47:10 -05:00
parent 0d7f77b1e3
commit 0f190a3f26
60 changed files with 966 additions and 4872 deletions

View File

@@ -0,0 +1,24 @@
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace SoilMoistureAPI.Models
{
public class SoilMoisture
{
[Key]
public int Id { get; set; }
[Required]
[ForeignKey("Device")]
public string DeviceId { get; set; } // Foreign Key
[Required]
public float MoistureLevel { get; set; }
public DateTime Timestamp { get; set; } = DateTime.UtcNow;
// Navigation Property
public Device Device { get; set; }
}
}