Relationships controllers

This commit is contained in:
2025-04-17 23:54:35 +08:00
parent cec8c3af81
commit f9701764f3
8 changed files with 282 additions and 61 deletions

View File

@ -1,18 +1,22 @@
using NodaTime;
namespace DysonNetwork.Sphere.Account;
public enum RelationshipType
public enum RelationshipStatus
{
Friend,
Pending,
Friends,
Blocked
}
public class Relationship : ModelBase
{
public long FromAccountId { get; set; }
public Account FromAccount { get; set; } = null!;
public long AccountId { get; set; }
public Account Account { get; set; } = null!;
public long RelatedId { get; set; }
public Account Related { get; set; } = null!;
public long ToAccountId { get; set; }
public Account ToAccount { get; set; } = null!;
public Instant? ExpiredAt { get; set; }
public RelationshipType Type { get; set; }
public RelationshipStatus Status { get; set; } = RelationshipStatus.Pending;
}