Implemented automated asset counter into asset creation and asset update, Fixed uid visible in owner attribute in Assets frontend

This commit is contained in:
2025-10-12 18:49:09 +02:00
parent 434b0952dc
commit a3c5a5341d
5 changed files with 82 additions and 33 deletions

View File

@@ -1,11 +0,0 @@
namespace Berufsschule_HAM.Models;
public class AssetsCreateRequestModel
{
public required string Cn { get; set; }
public AssetDescription? Description { get; set; } = null;
public string? Location { get; set; } = null;
public string? Name { get; set; } = null;
public string? Owner { get; set; } = null;
public string? SerialNumber { get; set; } = null;
}

View File

@@ -1,15 +1,31 @@
using System.Text.Json.Serialization;
using Microsoft.AspNetCore.Mvc;
namespace Berufsschule_HAM.Models;
public class AssetsModifyRequestModel
public class AssetsCreateRequestModel
{
public required string Cn { get; set; }
public string? NewCn { get; set; } = null;
[FromBody]
public AssetDescription? Description { get; set; } = null;
public string? Location { get; set; } = null;
public string? Name { get; set; } = null;
public string? Owner { get; set; } = null;
public string? SerialNumber { get; set; } = null;
}
public class AssetsModifyRequestModel
{
[JsonPropertyName("Cn")]
public required string Cn { get; set; }
[JsonPropertyName("NewCn")]
public string? NewCn { get; set; } = null;
[JsonPropertyName("Description")]
public AssetDescription? Description { get; set; } = null;
[JsonPropertyName("Location")]
public string? Location { get; set; } = null;
[JsonPropertyName("Name")]
public string? Name { get; set; } = null;
[JsonPropertyName("Owner")]
public string? Owner { get; set; } = null;
[JsonPropertyName("SerialNumber")]
public string? SerialNumber { get; set; } = null;
}