mirror of
https://github.com/Govor-team/Govor.git
synced 2026-07-21 19:54:55 +00:00
Add friendship feature with models, repository, and tests
Introduces Friendship and PrivateChat models, repository interfaces, and implementations for managing friendships. Adds validators and comprehensive unit and integration tests for friendship logic. Updates InviteUserController with new endpoints and restricts access to admin role. Removes unnecessary project references from Govor.API.csproj and registers new DbSets in GovorDbContext.
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
namespace Govor.Core.Models;
|
||||
|
||||
public class Friendship
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid RequesterId { get; set; }
|
||||
public Guid AddresseeId { get; set; }
|
||||
public FriendshipStatus Status { get; set; }
|
||||
|
||||
public User Requester { get; set; }
|
||||
public User Addressee { get; set; }
|
||||
}
|
||||
|
||||
public enum FriendshipStatus
|
||||
{
|
||||
Pending,
|
||||
Accepted,
|
||||
Rejected,
|
||||
Blocked
|
||||
}
|
||||
Reference in New Issue
Block a user