using System.Text.Json;
using XFEExtension.NetCore.ServerInteractive.Interfaces;
using XFEExtension.NetCore.ServerInteractive.Models.UserModels;
using XFEExtension.NetCore.ServerInteractive.Utilities.JsonConverter;
namespace XFEExtension.NetCore.ServerInteractive.Utilities.Server.Services.CoreService;
///
public abstract class UserServiceBase : IUserServiceBase
{
///
public Func> GetUserFunction { get; set; } = () => [];
///
public Func> GetEncryptedUserLoginModelFunction { get; set; } = () => [];
///
public Action AddEncryptedUserLoginModelFunction { get; set; } = _ => { };
///
public Action RemoveEncryptedUserLoginModelFunction { get; set; } = _ => { };
///
public Action AddUserFunction { get; set; } = _ => { };
///
public Action UpdateUserFunction { get; set; } = _ => { };
///
public Func GetLoginKeepDays { get; set; } = () => 7;
///
public JsonSerializerOptions JsonSerializerOptions { get; set; } = new();
///
protected UserServiceBase() => JsonSerializerOptions.Converters.Add(new JsonDateTimeConverter());
}