Initial Commit
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
namespace WyvernInventory.Core.Interfaces.Repos;
|
||||
|
||||
public interface IDbObjectRepo<T>
|
||||
{
|
||||
public Task<List<T>> GetAsync(Predicate<T>? filter = null);
|
||||
public Task<(int created, int updated)> UpsertAsync(List<T> items);
|
||||
public Task DeleteAsync(List<T> items);
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace WyvernInventory.Core.Interfaces.Services;
|
||||
|
||||
public interface IDataObjectService<T>
|
||||
{
|
||||
public Task<List<T>> GetAsync(Predicate<T>? filter = null);
|
||||
public Task<(int created, int updated)> UpsertAsync(List<T> items);
|
||||
public Task DeleteAsync(List<T> items);
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
namespace WyvernInventory.Core.Models;
|
||||
|
||||
public record Computer() : GenericInventoryItem
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
namespace WyvernInventory.Core.Models;
|
||||
|
||||
public record Cpu() : GenericInventoryItem
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace WyvernInventory.Core.Models;
|
||||
|
||||
public record GenericInventoryItem()
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
public string? Name { get; set; }
|
||||
public string? Description { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
namespace WyvernInventory.Core.Models;
|
||||
|
||||
public record Gpu() : GenericInventoryItem
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
namespace WyvernInventory.Core.Models;
|
||||
|
||||
public record Router() : GenericInventoryItem
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
namespace WyvernInventory.Core.Models;
|
||||
|
||||
public record StorageDrive() : GenericInventoryItem
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
namespace WyvernInventory.Core.Models;
|
||||
|
||||
public record Switch() : GenericInventoryItem
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<AssemblyName>WyvernInventory.Core</AssemblyName>
|
||||
<RootNamespace>WyvernInventory.Core</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
Reference in New Issue
Block a user