(feature): patch model field and operations

This commit is contained in:
Maksym Sadovnychyy 2024-10-26 19:20:51 +02:00
parent fd799615f7
commit 387e4d68ff
3 changed files with 16 additions and 1 deletions

View File

@ -8,7 +8,7 @@
<!-- NuGet package metadata --> <!-- NuGet package metadata -->
<PackageId>MaksIT.Core</PackageId> <PackageId>MaksIT.Core</PackageId>
<Version>1.1.4</Version> <Version>1.1.5</Version>
<Authors>Maksym Sadovnychyy</Authors> <Authors>Maksym Sadovnychyy</Authors>
<Company>MAKS-IT</Company> <Company>MAKS-IT</Company>
<Product>MaksIT.Core</Product> <Product>MaksIT.Core</Product>

View File

@ -0,0 +1,7 @@

namespace MaksIT.Core.Webapi.Models;
public class PatchField<T> {
public PatchOperation Operation { get; set; }
public T? Value { get; set; }
}

View File

@ -0,0 +1,8 @@
namespace MaksIT.Core.Webapi.Models;
public enum PatchOperation {
Replace,
Add,
Remove,
Clear // for collections
}