♻️ Remove the Sphere project depends on the Pass project. Move to the shared project instead.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text.Json.Serialization;
|
||||
using DysonNetwork.Pass.Account;
|
||||
using DysonNetwork.Shared.Data;
|
||||
using DysonNetwork.Sphere.Chat;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
@@ -48,7 +47,7 @@ public class RealmMember : ModelBase
|
||||
public Guid RealmId { get; set; }
|
||||
public Realm Realm { get; set; } = null!;
|
||||
public Guid AccountId { get; set; }
|
||||
[NotMapped] public Account? Account { get; set; }
|
||||
[NotMapped] public AccountReference? Account { get; set; }
|
||||
[NotMapped] public AccountStatusReference? Status { get; set; }
|
||||
|
||||
public int Role { get; set; } = RealmMemberRole.Normal;
|
||||
|
@@ -1,5 +1,6 @@
|
||||
using DysonNetwork.Shared;
|
||||
using DysonNetwork.Shared.Cache;
|
||||
using DysonNetwork.Shared.Data;
|
||||
using DysonNetwork.Shared.Proto;
|
||||
using DysonNetwork.Shared.Registry;
|
||||
using DysonNetwork.Sphere.Localization;
|
||||
@@ -73,7 +74,7 @@ public class RealmService(
|
||||
public async Task<RealmMember> LoadMemberAccount(RealmMember member)
|
||||
{
|
||||
var account = await accountsHelper.GetAccount(member.AccountId);
|
||||
member.Account = Pass.Account.Account.FromProtoValue(account);
|
||||
member.Account = AccountReference.FromProtoValue(account);
|
||||
return member;
|
||||
}
|
||||
|
||||
@@ -85,7 +86,7 @@ public class RealmService(
|
||||
return members.Select(m =>
|
||||
{
|
||||
if (accounts.TryGetValue(m.AccountId, out var account))
|
||||
m.Account = Pass.Account.Account.FromProtoValue(account);
|
||||
m.Account = AccountReference.FromProtoValue(account);
|
||||
return m;
|
||||
}).ToList();
|
||||
}
|
||||
|
Reference in New Issue
Block a user