Add remaining project files
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
using LiteDB;
|
||||
using System.Numerics;
|
||||
using DeluxeBackend.Models;
|
||||
using static DeluxeBackend.Enums;
|
||||
|
||||
namespace DeluxeBackend.Models
|
||||
{
|
||||
public class Relationship
|
||||
{
|
||||
[BsonId]
|
||||
public long Id { get; set; }
|
||||
|
||||
[BsonRef("accounts")]
|
||||
public required Account Player { get; set; }
|
||||
|
||||
[BsonRef("accounts")]
|
||||
public required Account TargetPlayer { get; set; }
|
||||
|
||||
public RelationshipType RelationshipType { get; set; } = RelationshipType.None;
|
||||
public MuteState Muted { get; set; } = MuteState.None;
|
||||
public IgnoreState Ignored { get; set; } = IgnoreState.None;
|
||||
public int Favorited { get; set; } = 0;
|
||||
|
||||
public Dictionary<string, object> ToDictionary()
|
||||
{
|
||||
return new Dictionary<string, object>
|
||||
{
|
||||
["PlayerID"] = TargetPlayer.Id,
|
||||
["RelationshipType"] = (int)RelationshipType,
|
||||
["Muted"] = (int)Muted,
|
||||
["Ignored"] = (int)Ignored,
|
||||
["Favorited"] = Favorited
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user