using e_suite.API.Common.models.@base;
using e_suite.Database.Core.Tables.UserManager;
using eSuite.Core.Miscellaneous;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;

namespace e_suite.API.Common.models;

public class EditUser : UserBase
{
    [JsonPropertyName("id")]
    [Required]
    [DefaultValue(null)]
    public GeneralIdRef Id { get; set; } = null!;
}

[Patches(typeof(User))]
public class PatchUser
{
    [PatchMap(nameof(User.FirstName))]
    public string? FirstName { get; set; }

    [PatchMap(nameof(User.LastName))]
    public string? LastName { get; set; }

    [PatchMap(nameof(User.MiddleNames))]
    public string? MiddleNames { get; set; }

    [PatchMap(nameof(User.Email))]
    public string? Email { get; set; }

    [PatchMap(nameof(User.Domain))]
    public GeneralIdRef? Domain { get; set; }
}