From 7de53b1cb30266c416555f278ebd9cce09571fa2 Mon Sep 17 00:00:00 2001 From: Hyun Seungmin Date: Thu, 26 Sep 2024 15:25:04 +0900 Subject: [PATCH] ignore some properties --- Lib9c.Models/Stats/DecimalStat.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Lib9c.Models/Stats/DecimalStat.cs b/Lib9c.Models/Stats/DecimalStat.cs index 49f18063..31d01798 100644 --- a/Lib9c.Models/Stats/DecimalStat.cs +++ b/Lib9c.Models/Stats/DecimalStat.cs @@ -2,6 +2,7 @@ using Bencodex.Types; using Lib9c.Models.Exceptions; using Lib9c.Models.Extensions; +using MongoDB.Bson.Serialization.Attributes; using Nekoyume.Model.Stat; using ValueKind = Bencodex.Types.ValueKind; @@ -16,15 +17,18 @@ public record DecimalStat : IBencodable public decimal BaseValue { get; init; } public decimal AdditionalValue { get; init; } + [BsonIgnore, GraphQLIgnore] public IValue Bencoded => Dictionary.Empty .Add("statType", StatType.Serialize()) .Add("value", BaseValue.Serialize()) .Add("additionalValue", AdditionalValue.Serialize()); + [BsonIgnore, GraphQLIgnore] public IValue BencodedWithoutAdditionalValue => Dictionary.Empty .Add("statType", StatType.Serialize()) .Add("value", BaseValue.Serialize()); + [BsonIgnore, GraphQLIgnore] public IValue BencodedAsLegacy => Dictionary.Empty .Add("type", StatType.Serialize()) .Add("value", BaseValue.Serialize());