mirror of
https://github.com/LD-Reborn/Berufsschule_HAM.git
synced 2025-12-20 06:51:55 +00:00
Implemented users update button in frontend
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Berufsschule_HAM.Models;
|
||||
|
||||
@@ -26,17 +27,24 @@ public class UserModel
|
||||
|
||||
public class UserDescription
|
||||
{
|
||||
[JsonPropertyName("BirthDate")]
|
||||
public required string BirthDate { get; set; }
|
||||
[JsonPropertyName("Address")]
|
||||
public required UserAddress Address { get; set; }
|
||||
[JsonPropertyName("Workplace")]
|
||||
public required string Workplace { get; set; }
|
||||
[JsonPropertyName("Groups")]
|
||||
public List<string>? Groups { get; set; }
|
||||
}
|
||||
|
||||
public class UserAddress
|
||||
{
|
||||
[JsonPropertyName("City")]
|
||||
public string? City { get; set; }
|
||||
[JsonPropertyName("Street")]
|
||||
public string? Street { get; set; }
|
||||
public string? StreetNr { get; set; }
|
||||
[JsonPropertyName("StreetNr")]
|
||||
public int? StreetNr { get; set; }
|
||||
}
|
||||
|
||||
public class UserAuthenticationResult
|
||||
@@ -61,5 +69,5 @@ public class UserTableViewModel
|
||||
public required string Title { get; set; }
|
||||
public required string Name { get; set; }
|
||||
public required string Surname { get; set; }
|
||||
public required string Workplace { get; set; }
|
||||
public required UserDescription Description { get; set; }
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Berufsschule_HAM.Models;
|
||||
|
||||
public class UsersIndexRequestModel
|
||||
@@ -13,13 +15,21 @@ public class UsersIndexRequestModel
|
||||
|
||||
public class UsersModifyRequestModel
|
||||
{
|
||||
public required string uid { get; set; }
|
||||
[JsonPropertyName("Uid")]
|
||||
public required string Uid { get; set; }
|
||||
[JsonPropertyName("NewUid")]
|
||||
public string? NewUid { get; set; } = null;
|
||||
[JsonPropertyName("Cn")]
|
||||
public string? Cn { get; set; } = null;
|
||||
[JsonPropertyName("Sn")]
|
||||
public string? Sn { get; set; } = null;
|
||||
[JsonPropertyName("Title")]
|
||||
public string? Title { get; set; } = null;
|
||||
public string? Description { get; set; } = null;
|
||||
[JsonPropertyName("Description")]
|
||||
public UserDescription? Description { get; set; } = null;
|
||||
[JsonPropertyName("JpegPhoto")]
|
||||
public string? JpegPhoto { get; set; } = null;
|
||||
[JsonPropertyName("UserPassword")]
|
||||
public string? UserPassword { get; set; } = null;
|
||||
}
|
||||
|
||||
|
||||
13
src/Models/UsersResponseModels.cs
Normal file
13
src/Models/UsersResponseModels.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Berufsschule_HAM.Models;
|
||||
|
||||
public class UsersUpdateRequestModel
|
||||
{
|
||||
[JsonPropertyName("Success")]
|
||||
public required bool Success { get; set; }
|
||||
[JsonPropertyName("Exception")]
|
||||
public string? Exception { get; set; }
|
||||
[JsonPropertyName("NewUid")]
|
||||
public string? NewUid { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user