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 ProjectToResponse(this IQueryable roles); }