mirror of
https://github.com/LD-Reborn/Berufsschule_HAM.git
synced 2025-12-20 06:51:55 +00:00
Implemented frontend Assets update button
This commit is contained in:
@@ -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; }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user