Implemented frontend Assets update button

This commit is contained in:
2025-10-10 19:52:28 +02:00
parent fd20b2ae2d
commit dd865b99be
5 changed files with 312 additions and 11 deletions

View File

@@ -1,15 +1,22 @@
namespace Berufsschule_HAM.Models;
using System.Text.Json;
using System.Text.Json.Serialization;
using Berufsschule_HAM.Exceptions;
public class AssetModel
{
[JsonPropertyName("Cn")]
public required string Cn { get; set; }
[JsonPropertyName("SerialNumber")]
public string? SerialNumber { get; set; }
[JsonPropertyName("Description")]
public AssetDescription? Description { get; set; }
[JsonPropertyName("Location")]
public string? Location { get; set; }
[JsonPropertyName("Owner")]
public string? Owner { get; set; }
[JsonPropertyName("Name")]
public string? Name { get; set; }
public AssetModel(Dictionary<string, string> ldapData)
@@ -33,18 +40,27 @@ public class AssetModel
public class AssetDescription
{
[JsonPropertyName("Type")]
public string? Type { get; set; }
[JsonPropertyName("Make")]
public string? Make { get; set; }
[JsonPropertyName("Model")]
public string? Model { get; set; }
[JsonPropertyName("Attributes")]
public Dictionary<string, string>? Attributes { get; set; }
[JsonPropertyName("Purchase")]
public AssetPurchase? Purchase { get; set; }
}
public class AssetPurchase
{
[JsonPropertyName("PurchaseDate")]
public string? PurchaseDate { get; set; }
[JsonPropertyName("PurchaseValue")]
public string? PurchaseValue { get; set; }
[JsonPropertyName("PurchaseAt")]
public string? PurchasedAt { get; set; }
[JsonPropertyName("PurchaseBy")]
public string? PurchasedBy { get; set; }
}