Implemented roles and action timestamps. Added oermissions selector and interfaces

This commit was merged in pull request #3.
This commit is contained in:
2026-01-14 19:03:17 +01:00
parent 43d43a6d7d
commit 06063b94b3
33 changed files with 1192 additions and 5 deletions

View File

@@ -0,0 +1,20 @@
using System.Diagnostics.CodeAnalysis;
using Moonlight.Api.Database.Entities;
using Moonlight.Shared.Http.Requests.Roles;
using Moonlight.Shared.Http.Responses.Admin;
using Riok.Mapperly.Abstractions;
namespace Moonlight.Api.Mappers;
[Mapper]
[SuppressMessage("Mapper", "RMG020:Source member is not mapped to any target member")]
[SuppressMessage("Mapper", "RMG012:Source member was not found for target member")]
public static partial class RoleMapper
{
[MapProperty([nameof(Role.Members), nameof(Role.Members.Count)], nameof(RoleResponse.MemberCount))]
public static partial RoleResponse MapToResponse(Role role);
public static partial Role MapToRole(CreateRoleRequest request);
public static partial void Merge([MappingTarget] Role role, UpdateRoleRequest request);
public static partial IQueryable<RoleResponse> ProjectToResponse(this IQueryable<Role> roles);
}