Major rewrite
This commit is contained in:
18
SoilMoistureAPI/Models/Device.cs
Normal file
18
SoilMoistureAPI/Models/Device.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace SoilMoistureAPI.Models
|
||||
{
|
||||
public class Device
|
||||
{
|
||||
[Key]
|
||||
public string DeviceId { get; set; } // Primary Key
|
||||
|
||||
[Required]
|
||||
[MaxLength(100)]
|
||||
public string Nickname { get; set; }
|
||||
|
||||
// Navigation Property
|
||||
public ICollection<SoilMoisture> SoilMoistures { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user