feat(core): add base entity and password hashing abstractions
This commit is contained in:
@@ -0,0 +1,18 @@
|
|||||||
|
namespace FiscalOS.Core.Data;
|
||||||
|
|
||||||
|
public abstract class Entity
|
||||||
|
{
|
||||||
|
public Guid Id { get; init; }
|
||||||
|
public DateTimeOffset CreatedAt { get; private set; }
|
||||||
|
public DateTimeOffset UpdatedAt { get; private set; }
|
||||||
|
|
||||||
|
public void SetCreatedAt(DateTimeOffset createdAt)
|
||||||
|
{
|
||||||
|
CreatedAt = createdAt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetUpdatedAt(DateTimeOffset updatedAt)
|
||||||
|
{
|
||||||
|
UpdatedAt = updatedAt;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
namespace FiscalOS.Core.Identity;
|
||||||
|
|
||||||
|
public interface IPasswordHasher
|
||||||
|
{
|
||||||
|
string Hash(string password);
|
||||||
|
bool Verify(string providedPassword, string hashedPassword);
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
global using FiscalOS.Core.Data;
|
||||||
Reference in New Issue
Block a user