Добавил wizard
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 12s

This commit is contained in:
2026-07-08 16:19:15 +03:00
parent fd6506af7b
commit 6d61bce884
9 changed files with 371 additions and 30 deletions
+1 -5
View File
@@ -17,16 +17,12 @@ public class ObjectController : ControllerBase
//=========================== GET =================================//
[HttpGet("GetObject")]
[ProducesResponseType<List<ObjectItem>>(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status204NoContent)]
public IActionResult GetList()
{
using (var db = new SQLiteService())
{
var oi = db.ObjectItems.ToList();
//if (oi.Count != 0)
return Ok(oi);
//else return NoContent();
}
}
@@ -65,7 +61,7 @@ public class ObjectController : ControllerBase
{
using (var db = new SQLiteService())
{
db.ObjectItems.Add(o);//.Where(u => u.Name == name).FirstOrDefault();
db.ObjectItems.Add(o);
db.SaveChanges();
return Created();
}
+10 -9
View File
@@ -10,17 +10,18 @@
public string? Location { get; set; }
public List<DeviceItem>? ListDevices { get; set; }
public DeviceType? DeviceType { get; set; }
public ObjectItem? DeviceObject { get; set; }
public int ConnectedToSwitchId { get; set; }
public int ConnectedToPortOnSwitch { get; set; }
}
//Unknown = 0,
//SwitchCore = 1,
//SwitchAccess = 2,
//Camera = 3,
//Server = 4,
//WorkStation = 5,
//PDU_AVR = 6,
//Unknown = 0,
//SwitchCore = 1,
//SwitchAccess = 2,
//Camera = 3,
//Server = 4,
//WorkStation = 5,
//PDU_AVR = 6,
}
+1
View File
@@ -4,5 +4,6 @@
{
public int Id { get; set; }
public string Name { get; set; }
public string? Description { get; set; }
}
}
+1 -1
View File
@@ -4,6 +4,6 @@
{
public int Id { get; set; }
public string NameObject { get; set; } = "Unknown";
public string DescriptionObject { get; set; } = string.Empty;
public string? DescriptionObject { get; set; } = null;
}
}