Разделение
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Knot.Contracts.Relations.Domain;
|
||||
|
||||
namespace Knot.Contracts.Relations.Application.Abstractions;
|
||||
|
||||
public interface IFriendshipRepository
|
||||
{
|
||||
Task<List<Friendship>> GetAcceptedFriendshipsAsync(Guid userId, CancellationToken ct = default);
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
namespace Knot.Contracts.Relations.Domain;
|
||||
|
||||
using System;
|
||||
|
||||
public record Friendship(
|
||||
Guid Id,
|
||||
Guid UserId,
|
||||
Guid FriendId,
|
||||
FriendshipStatus Status,
|
||||
DateTime CreatedAt
|
||||
);
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace Knot.Contracts.Relations.Domain;
|
||||
|
||||
public enum FriendshipStatus
|
||||
{
|
||||
Pending,
|
||||
Accepted,
|
||||
Declined
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
namespace Knot.Contracts.Relations.Domain;
|
||||
|
||||
using System;
|
||||
|
||||
public record UserReplica(
|
||||
Guid Id,
|
||||
string Username,
|
||||
string DisplayName,
|
||||
string Avatar,
|
||||
bool IsExternal,
|
||||
string? Domain
|
||||
);
|
||||
Reference in New Issue
Block a user