From c7925d98c89642a405973d8b23cd3dec563e0d7f Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Sat, 23 Aug 2025 14:25:46 +0800 Subject: [PATCH] :bug: Fix bot account missing created / updated at --- DysonNetwork.Shared/Data/Account.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/DysonNetwork.Shared/Data/Account.cs b/DysonNetwork.Shared/Data/Account.cs index cb70a70..789e5ae 100644 --- a/DysonNetwork.Shared/Data/Account.cs +++ b/DysonNetwork.Shared/Data/Account.cs @@ -4,7 +4,7 @@ using NodaTime.Serialization.Protobuf; namespace DysonNetwork.Shared.Data; -public class AccountReference +public class AccountReference : ModelBase { public Guid Id { get; set; } public string Name { get; set; } = string.Empty; @@ -17,8 +17,6 @@ public class AccountReference public List Contacts { get; set; } = new(); public List Badges { get; set; } = new(); public SubscriptionReference? PerkSubscription { get; set; } - public Instant CreatedAt { get; set; } - public Instant UpdatedAt { get; set; } public Proto.Account ToProtoValue() { @@ -75,7 +73,7 @@ public class AccountReference } } -public class AccountProfileReference +public class AccountProfileReference : ModelBase { public Guid Id { get; set; } public string? FirstName { get; set; } @@ -135,6 +133,8 @@ public class AccountProfileReference Background = Background?.ToProtoValue(), AccountId = AccountId.ToString(), Verification = Verification?.ToProtoValue(), + CreatedAt = CreatedAt.ToTimestamp(), + UpdatedAt = UpdatedAt.ToTimestamp() }; return proto; @@ -161,6 +161,8 @@ public class AccountProfileReference Background = proto.Background != null ? CloudFileReferenceObject.FromProtoValue(proto.Background) : null, AccountId = Guid.Parse(proto.AccountId), Verification = proto.Verification != null ? VerificationMark.FromProtoValue(proto.Verification) : null, + CreatedAt = proto.CreatedAt.ToInstant(), + UpdatedAt = proto.UpdatedAt.ToInstant() }; } }