using System.Text.Json.Serialization;

namespace Berufsschule_HAM.Models;

public class UsersGetAllRequestModel
{
    public string? Uid { get; set; } = null;
    public bool Cn { get; set; } = true;
    public bool Sn { get; set; } = true;
    public bool Title { get; set; } = true;
    public bool Description { get; set; } = true;
    public bool JpegPhoto { get; set; } = true;
    public bool UserPassword { get; set; } = true;
}

public class UsersModifyRequestModel : UsersCreateRequestModel
{
    [JsonPropertyName("Uid")]
    public required string Uid { get; set; }    
    [JsonPropertyName("NewUid")]
    public string? NewUid { get; set; } = null;
}

public class UsersCreateRequestModel
{
    [JsonPropertyName("Cn")]
    public string? Cn { get; set; } = null;
    [JsonPropertyName("Sn")]
    public string? Sn { get; set; } = null;
    [JsonPropertyName("Title")]
    public string? Title { 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;
}

public class UsersDeleteRequestModel(bool successful, string exception = "None")
{
    public bool Success { get; set; } = successful;

    public string? Exception { get; set; } = exception;
}

public class UsersAddGroupRequestModel
{
    public required string Uid { get; set; }
    public required string GroupUid { get; set; }
}

public class UsersRemoveGroupRequestModel
{
    public required string Uid { get; set; }
    public required string GroupUid { get; set; }
}