Files
Swarm/DysonNetwork.Shared/Services/IRelationshipService.cs
2025-07-07 21:54:51 +08:00

28 lines
804 B
C#

using DysonNetwork.Shared.Models;
using MagicOnion;
namespace DysonNetwork.Shared.Services;
public interface IRelationshipService : IService<IRelationshipService>
{
/// <summary>
/// Checks if a relationship exists between two accounts
/// </summary>
Task<bool> HasExistingRelationship(Guid accountId, Guid relatedId);
/// <summary>
/// Gets a relationship between two accounts
/// </summary>
Task<Relationship?> GetRelationship(
Guid accountId,
Guid relatedId,
RelationshipStatus? status = null,
bool ignoreExpired = false
);
/// <summary>
/// Creates a new relationship between two accounts
/// </summary>
Task<Relationship> CreateRelationship(Account sender, Account target, RelationshipStatus status);
}