Skip to content

Commit

Permalink
ignore some properties
Browse files Browse the repository at this point in the history
  • Loading branch information
boscohyun committed Sep 26, 2024
1 parent 9067e8b commit 7de53b1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Lib9c.Models/Stats/DecimalStat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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());
Expand Down

0 comments on commit 7de53b1

Please sign in to comment.