vue plugin system somehow works

This commit is contained in:
2021-12-29 01:25:35 +01:00
parent 1954659a82
commit ee20eb16e1
30 changed files with 136 additions and 51 deletions
+12
View File
@@ -0,0 +1,12 @@
namespace zero.Models;
/// <summary>
/// Entities decorated with this interface are always set to IsActive=true
/// </summary>
public interface IAlwaysActive
{
/// <summary>
/// Whether the entity is visible in the frontend
/// </summary>
bool IsActive { get; set; }
}
+2
View File
@@ -9,6 +9,8 @@ public class Paged<T> : Paged
Items = items;
}
public Paged(long totalItems, long pageNumber, long pageSize) : base(totalItems, pageNumber, pageSize) { }
public Paged<TTarget> MapTo<TTarget>(Func<T, TTarget> convertItem)
{
return new Paged<TTarget>(Items.Select(x => convertItem(x)).Where(x => x != null).ToList(), TotalItems, Page, PageSize);