From 37c6847890f7a14d1c8504c00266c4bf9c340e2e Mon Sep 17 00:00:00 2001 From: CWX Date: Wed, 8 Jan 2025 13:27:58 +0000 Subject: [PATCH] more nulls --- .../Eft/Quests/AcceptQuestRequestData.cs | 12 +-- .../Eft/Quests/CompleteQuestRequestData.cs | 14 +-- .../Models/Eft/Quests/FailQuestRequestData.cs | 8 +- .../Eft/Quests/HandoverQuestRequestData.cs | 24 ++--- .../Eft/Quests/ListQuestsRequestData.cs | 4 +- .../Eft/Quests/RepeatableQuestChangeEvent.cs | 8 +- .../Models/Eft/Ragfair/AddOfferRequestData.cs | 36 +++---- .../Eft/Ragfair/ExtendOfferRequestData.cs | 8 +- Core/Models/Eft/Ragfair/GetItemPriceResult.cs | 4 +- .../Eft/Ragfair/GetMarketPriceRequestData.cs | 4 +- Core/Models/Eft/Ragfair/GetOffersResult.cs | 6 +- .../Eft/Ragfair/GetRagfairOfferByIdRequest.cs | 4 +- Core/Models/Eft/Ragfair/RagfairOffer.cs | 96 +++++++++---------- .../Eft/Ragfair/RemoveOfferRequestData.cs | 8 +- Core/Models/Eft/Ragfair/SearchRequestData.cs | 46 ++++----- .../Ragfair/SendRagfairReportRequestData.cs | 4 +- .../StorePlayerOfferTaxAmountRequestData.cs | 16 ++-- 17 files changed, 151 insertions(+), 151 deletions(-) diff --git a/Core/Models/Eft/Quests/AcceptQuestRequestData.cs b/Core/Models/Eft/Quests/AcceptQuestRequestData.cs index 70077eff..0fce6a5a 100644 --- a/Core/Models/Eft/Quests/AcceptQuestRequestData.cs +++ b/Core/Models/Eft/Quests/AcceptQuestRequestData.cs @@ -4,12 +4,12 @@ namespace Core.Models.Eft.Quests; public class AcceptQuestRequestData { - [JsonPropertyName("Action")] - public string Action { get; set; } = "QuestAccept"; + [JsonPropertyName("Action")] + public string? Action { get; set; } = "QuestAccept"; - [JsonPropertyName("qid")] - public string QuestId { get; set; } + [JsonPropertyName("qid")] + public string? QuestId { get; set; } - [JsonPropertyName("type")] - public string Type { get; set; } + [JsonPropertyName("type")] + public string? Type { get; set; } } \ No newline at end of file diff --git a/Core/Models/Eft/Quests/CompleteQuestRequestData.cs b/Core/Models/Eft/Quests/CompleteQuestRequestData.cs index 6e105d3b..6be62db2 100644 --- a/Core/Models/Eft/Quests/CompleteQuestRequestData.cs +++ b/Core/Models/Eft/Quests/CompleteQuestRequestData.cs @@ -4,13 +4,13 @@ namespace Core.Models.Eft.Quests; public class CompleteQuestRequestData { - [JsonPropertyName("Action")] - public string Action { get; set; } + [JsonPropertyName("Action")] + public string? Action { get; set; } - /** Quest Id */ - [JsonPropertyName("qid")] - public string QuestId { get; set; } + /** Quest Id */ + [JsonPropertyName("qid")] + public string? QuestId { get; set; } - [JsonPropertyName("removeExcessItems")] - public bool RemoveExcessItems { get; set; } + [JsonPropertyName("removeExcessItems")] + public bool? RemoveExcessItems { get; set; } } \ No newline at end of file diff --git a/Core/Models/Eft/Quests/FailQuestRequestData.cs b/Core/Models/Eft/Quests/FailQuestRequestData.cs index fb4f6721..f7b19306 100644 --- a/Core/Models/Eft/Quests/FailQuestRequestData.cs +++ b/Core/Models/Eft/Quests/FailQuestRequestData.cs @@ -2,14 +2,14 @@ namespace Core.Models.Eft.Quests; -public class FailQuestRequestData +public class FailQuestRequestData { [JsonPropertyName("Action")] - public string Action { get; set; } = "QuestFail"; + public string? Action { get; set; } = "QuestFail"; [JsonPropertyName("qid")] - public string QuestId { get; set; } + public string? QuestId { get; set; } [JsonPropertyName("removeExcessItems")] - public bool RemoveExcessItems { get; set; } + public bool? RemoveExcessItems { get; set; } } \ No newline at end of file diff --git a/Core/Models/Eft/Quests/HandoverQuestRequestData.cs b/Core/Models/Eft/Quests/HandoverQuestRequestData.cs index 58a413bd..3690d902 100644 --- a/Core/Models/Eft/Quests/HandoverQuestRequestData.cs +++ b/Core/Models/Eft/Quests/HandoverQuestRequestData.cs @@ -4,24 +4,24 @@ namespace Core.Models.Eft.Quests; public class HandoverQuestRequestData { - [JsonPropertyName("Action")] - public string Action { get; set; } = "QuestHandover"; + [JsonPropertyName("Action")] + public string? Action { get; set; } = "QuestHandover"; - [JsonPropertyName("qid")] - public string QuestId { get; set; } + [JsonPropertyName("qid")] + public string? QuestId { get; set; } - [JsonPropertyName("conditionId")] - public string ConditionId { get; set; } + [JsonPropertyName("conditionId")] + public string? ConditionId { get; set; } - [JsonPropertyName("items")] - public List Items { get; set; } + [JsonPropertyName("items")] + public List? Items { get; set; } } public class HandoverItem { - [JsonPropertyName("id")] - public string Id { get; set; } + [JsonPropertyName("id")] + public string? Id { get; set; } - [JsonPropertyName("count")] - public int Count { get; set; } + [JsonPropertyName("count")] + public int? Count { get; set; } } \ No newline at end of file diff --git a/Core/Models/Eft/Quests/ListQuestsRequestData.cs b/Core/Models/Eft/Quests/ListQuestsRequestData.cs index 5c02fb27..3f846c32 100644 --- a/Core/Models/Eft/Quests/ListQuestsRequestData.cs +++ b/Core/Models/Eft/Quests/ListQuestsRequestData.cs @@ -4,6 +4,6 @@ namespace Core.Models.Eft.Quests; public class ListQuestsRequestData { - [JsonPropertyName("completed")] - public bool Completed { get; set; } + [JsonPropertyName("completed")] + public bool? Completed { get; set; } } \ No newline at end of file diff --git a/Core/Models/Eft/Quests/RepeatableQuestChangeEvent.cs b/Core/Models/Eft/Quests/RepeatableQuestChangeEvent.cs index fdc5b65a..4a03d579 100644 --- a/Core/Models/Eft/Quests/RepeatableQuestChangeEvent.cs +++ b/Core/Models/Eft/Quests/RepeatableQuestChangeEvent.cs @@ -4,9 +4,9 @@ namespace Core.Models.Eft.Quests; public class RepeatableQuestChangeRequest { - [JsonPropertyName("Action")] - public string Action { get; set; } = "RepeatableQuestChange"; + [JsonPropertyName("Action")] + public string? Action { get; set; } = "RepeatableQuestChange"; - [JsonPropertyName("qid")] - public string QuestId { get; set; } + [JsonPropertyName("qid")] + public string? QuestId { get; set; } } \ No newline at end of file diff --git a/Core/Models/Eft/Ragfair/AddOfferRequestData.cs b/Core/Models/Eft/Ragfair/AddOfferRequestData.cs index 2de8c102..b5ded6db 100644 --- a/Core/Models/Eft/Ragfair/AddOfferRequestData.cs +++ b/Core/Models/Eft/Ragfair/AddOfferRequestData.cs @@ -4,33 +4,33 @@ namespace Core.Models.Eft.Ragfair; public class AddOfferRequestData { - [JsonPropertyName("Action")] - public string Action { get; set; } + [JsonPropertyName("Action")] + public string? Action { get; set; } - [JsonPropertyName("sellInOnePiece")] - public bool SellInOnePiece { get; set; } + [JsonPropertyName("sellInOnePiece")] + public bool? SellInOnePiece { get; set; } - [JsonPropertyName("items")] - public List Items { get; set; } + [JsonPropertyName("items")] + public List? Items { get; set; } - [JsonPropertyName("requirements")] - public List Requirements { get; set; } + [JsonPropertyName("requirements")] + public List? Requirements { get; set; } } public class Requirement { - [JsonPropertyName("_tpl")] - public string Template { get; set; } + [JsonPropertyName("_tpl")] + public string? Template { get; set; } - [JsonPropertyName("count")] - public int Count { get; set; } + [JsonPropertyName("count")] + public int? Count { get; set; } - [JsonPropertyName("level")] - public int Level { get; set; } + [JsonPropertyName("level")] + public int? Level { get; set; } - [JsonPropertyName("side")] - public int Side { get; set; } + [JsonPropertyName("side")] + public int? Side { get; set; } - [JsonPropertyName("onlyFunctional")] - public bool OnlyFunctional { get; set; } + [JsonPropertyName("onlyFunctional")] + public bool? OnlyFunctional { get; set; } } \ No newline at end of file diff --git a/Core/Models/Eft/Ragfair/ExtendOfferRequestData.cs b/Core/Models/Eft/Ragfair/ExtendOfferRequestData.cs index ffb29d65..42c941a8 100644 --- a/Core/Models/Eft/Ragfair/ExtendOfferRequestData.cs +++ b/Core/Models/Eft/Ragfair/ExtendOfferRequestData.cs @@ -4,9 +4,9 @@ namespace Core.Models.Eft.Ragfair; public class ExtendOfferRequestData { - [JsonPropertyName("offerId")] - public string OfferId { get; set; } + [JsonPropertyName("offerId")] + public string? OfferId { get; set; } - [JsonPropertyName("renewalTime")] - public int RenewalTime { get; set; } + [JsonPropertyName("renewalTime")] + public int? RenewalTime { get; set; } } \ No newline at end of file diff --git a/Core/Models/Eft/Ragfair/GetItemPriceResult.cs b/Core/Models/Eft/Ragfair/GetItemPriceResult.cs index 43d8ea66..b4fbcd52 100644 --- a/Core/Models/Eft/Ragfair/GetItemPriceResult.cs +++ b/Core/Models/Eft/Ragfair/GetItemPriceResult.cs @@ -5,6 +5,6 @@ namespace Core.Models.Eft.Ragfair; public class GetItemPriceResult : MinMax { - [JsonPropertyName("avg")] - public int Avg { get; set; } + [JsonPropertyName("avg")] + public int? Avg { get; set; } } \ No newline at end of file diff --git a/Core/Models/Eft/Ragfair/GetMarketPriceRequestData.cs b/Core/Models/Eft/Ragfair/GetMarketPriceRequestData.cs index df4c7b03..44bb3853 100644 --- a/Core/Models/Eft/Ragfair/GetMarketPriceRequestData.cs +++ b/Core/Models/Eft/Ragfair/GetMarketPriceRequestData.cs @@ -4,6 +4,6 @@ namespace Core.Models.Eft.Ragfair; public class GetMarketPriceRequestData { - [JsonPropertyName("templateId")] - public string TemplateId { get; set; } + [JsonPropertyName("templateId")] + public string? TemplateId { get; set; } } \ No newline at end of file diff --git a/Core/Models/Eft/Ragfair/GetOffersResult.cs b/Core/Models/Eft/Ragfair/GetOffersResult.cs index b464da73..75618aff 100644 --- a/Core/Models/Eft/Ragfair/GetOffersResult.cs +++ b/Core/Models/Eft/Ragfair/GetOffersResult.cs @@ -8,11 +8,11 @@ public class GetOffersResult public Dictionary? Categories { get; set; } [JsonPropertyName("offers")] - public List Offers { get; set; } + public List? Offers { get; set; } [JsonPropertyName("offersCount")] - public int OffersCount { get; set; } + public int? OffersCount { get; set; } [JsonPropertyName("selectedCategory")] - public string SelectedCategory { get; set; } + public string? SelectedCategory { get; set; } } \ No newline at end of file diff --git a/Core/Models/Eft/Ragfair/GetRagfairOfferByIdRequest.cs b/Core/Models/Eft/Ragfair/GetRagfairOfferByIdRequest.cs index 74bef8b2..7cb942d4 100644 --- a/Core/Models/Eft/Ragfair/GetRagfairOfferByIdRequest.cs +++ b/Core/Models/Eft/Ragfair/GetRagfairOfferByIdRequest.cs @@ -4,6 +4,6 @@ namespace Core.Models.Eft.Ragfair; public class GetRagfairOfferByIdRequest { - [JsonPropertyName("id")] - public int Id { get; set; } + [JsonPropertyName("id")] + public int? Id { get; set; } } \ No newline at end of file diff --git a/Core/Models/Eft/Ragfair/RagfairOffer.cs b/Core/Models/Eft/Ragfair/RagfairOffer.cs index 3e120aa3..d1c26a45 100644 --- a/Core/Models/Eft/Ragfair/RagfairOffer.cs +++ b/Core/Models/Eft/Ragfair/RagfairOffer.cs @@ -8,60 +8,60 @@ public class RagfairOffer { [JsonPropertyName("sellResult")] public List? SellResults { get; set; } - + [JsonPropertyName("_id")] - public string Id { get; set; } - + public string? Id { get; set; } + [JsonPropertyName("items")] - public List Items { get; set; } - + public List? Items { get; set; } + [JsonPropertyName("requirements")] - public List Requirements { get; set; } - + public List? Requirements { get; set; } + [JsonPropertyName("root")] - public string Root { get; set; } - + public string? Root { get; set; } + [JsonPropertyName("intId")] - public int InternalId { get; set; } - + public int? InternalId { get; set; } + /** Handbook price */ [JsonPropertyName("itemsCost")] - public decimal ItemsCost { get; set; } - + public decimal? ItemsCost { get; set; } + /** Rouble price per item */ [JsonPropertyName("requirementsCost")] - public decimal RequirementsCost { get; set; } - + public decimal? RequirementsCost { get; set; } + [JsonPropertyName("startTime")] - public long StartTime { get; set; } - + public long? StartTime { get; set; } + [JsonPropertyName("endTime")] - public long EndTime { get; set; } - + public long? EndTime { get; set; } + /** True when offer is sold as pack */ [JsonPropertyName("sellInOnePiece")] - public bool SellInOnePiece { get; set; } - + public bool? SellInOnePiece { get; set; } + /** Rouble price - same as requirementsCost */ [JsonPropertyName("summaryCost")] - public decimal SummaryCost { get; set; } - + public decimal? SummaryCost { get; set; } + [JsonPropertyName("user")] - public RagfairOfferUser User { get; set; } + public RagfairOfferUser? User { get; set; } /** Trader only */ [JsonPropertyName("unlimitedCount")] public bool? UnlimitedCount { get; set; } - + [JsonPropertyName("loyaltyLevel")] - public int LoyaltyLevel { get; set; } - + public int? LoyaltyLevel { get; set; } + [JsonPropertyName("buyRestrictionMax")] public int? BuyRestrictionMax { get; set; } - + [JsonPropertyName("buyRestrictionCurrent")] public int? BuyRestrictionCurrent { get; set; } - + [JsonPropertyName("locked")] public bool? Locked { get; set; } } @@ -69,17 +69,17 @@ public class RagfairOffer public class OfferRequirement { [JsonPropertyName("_tpl")] - public string Template { get; set; } - + public string? Template { get; set; } + [JsonPropertyName("count")] - public int Count { get; set; } - + public int? Count { get; set; } + [JsonPropertyName("onlyFunctional")] - public bool OnlyFunctional { get; set; } - + public bool? OnlyFunctional { get; set; } + [JsonPropertyName("level")] public int? Level { get; set; } - + [JsonPropertyName("side")] public DogtagExchangeSide? Side { get; set; } } @@ -87,26 +87,26 @@ public class OfferRequirement public class RagfairOfferUser { [JsonPropertyName("id")] - public string Id { get; set; } - + public string? Id { get; set; } + [JsonPropertyName("nickname")] public string? Nickname { get; set; } - + [JsonPropertyName("rating")] public decimal? Rating { get; set; } - + [JsonPropertyName("memberType")] - public MemberCategory MemberType { get; set; } - + public MemberCategory? MemberType { get; set; } + [JsonPropertyName("selectedMemberCategory")] public MemberCategory? SelectedMemberCategory { get; set; } - + [JsonPropertyName("avatar")] public string? Avatar { get; set; } - + [JsonPropertyName("isRatingGrowing")] public bool? IsRatingGrowing { get; set; } - + [JsonPropertyName("aid")] public int? Aid { get; set; } } @@ -114,8 +114,8 @@ public class RagfairOfferUser public class SellResult { [JsonPropertyName("sellTime")] - public long SellTime { get; set; } - + public long? SellTime { get; set; } + [JsonPropertyName("amount")] - public decimal Amount { get; set; } + public decimal? Amount { get; set; } } \ No newline at end of file diff --git a/Core/Models/Eft/Ragfair/RemoveOfferRequestData.cs b/Core/Models/Eft/Ragfair/RemoveOfferRequestData.cs index f54a1b3b..34704a72 100644 --- a/Core/Models/Eft/Ragfair/RemoveOfferRequestData.cs +++ b/Core/Models/Eft/Ragfair/RemoveOfferRequestData.cs @@ -4,9 +4,9 @@ namespace Core.Models.Eft.Ragfair; public class RemoveOfferRequestData { - [JsonPropertyName("Action")] - public string Action { get; set; } + [JsonPropertyName("Action")] + public string? Action { get; set; } - [JsonPropertyName("offerId")] - public string OfferId { get; set; } + [JsonPropertyName("offerId")] + public string? OfferId { get; set; } } \ No newline at end of file diff --git a/Core/Models/Eft/Ragfair/SearchRequestData.cs b/Core/Models/Eft/Ragfair/SearchRequestData.cs index fa37c184..10d2d2f6 100644 --- a/Core/Models/Eft/Ragfair/SearchRequestData.cs +++ b/Core/Models/Eft/Ragfair/SearchRequestData.cs @@ -6,73 +6,73 @@ namespace Core.Models.Eft.Ragfair; public class SearchRequestData { [JsonPropertyName("page")] - public int Page { get; set; } + public int? Page { get; set; } [JsonPropertyName("limit")] - public int Limit { get; set; } + public int? Limit { get; set; } [JsonPropertyName("sortType")] - public RagfairSort SortType { get; set; } + public RagfairSort? SortType { get; set; } [JsonPropertyName("sortDirection")] - public int SortDirection { get; set; } + public int? SortDirection { get; set; } [JsonPropertyName("currency")] - public int Currency { get; set; } + public int? Currency { get; set; } [JsonPropertyName("priceFrom")] - public int PriceFrom { get; set; } + public int? PriceFrom { get; set; } [JsonPropertyName("priceTo")] - public int PriceTo { get; set; } + public int? PriceTo { get; set; } [JsonPropertyName("quantityFrom")] - public int QuantityFrom { get; set; } + public int? QuantityFrom { get; set; } [JsonPropertyName("quantityTo")] - public int QuantityTo { get; set; } + public int? QuantityTo { get; set; } [JsonPropertyName("conditionFrom")] - public int ConditionFrom { get; set; } + public int? ConditionFrom { get; set; } [JsonPropertyName("conditionTo")] - public int ConditionTo { get; set; } + public int? ConditionTo { get; set; } [JsonPropertyName("oneHourExpiration")] - public bool OneHourExpiration { get; set; } + public bool? OneHourExpiration { get; set; } [JsonPropertyName("removeBartering")] - public bool RemoveBartering { get; set; } + public bool? RemoveBartering { get; set; } [JsonPropertyName("offerOwnerType")] - public OfferOwnerType OfferOwnerType { get; set; } + public OfferOwnerType? OfferOwnerType { get; set; } [JsonPropertyName("onlyFunctional")] - public bool OnlyFunctional { get; set; } + public bool? OnlyFunctional { get; set; } [JsonPropertyName("updateOfferCount")] - public bool UpdateOfferCount { get; set; } + public bool? UpdateOfferCount { get; set; } [JsonPropertyName("handbookId")] - public string HandbookId { get; set; } + public string? HandbookId { get; set; } [JsonPropertyName("linkedSearchId")] - public string LinkedSearchId { get; set; } + public string? LinkedSearchId { get; set; } [JsonPropertyName("neededSearchId")] - public string NeededSearchId { get; set; } + public string? NeededSearchId { get; set; } [JsonPropertyName("buildItems")] - public BuildItems BuildItems { get; set; } + public BuildItems? BuildItems { get; set; } [JsonPropertyName("buildCount")] - public int BuildCount { get; set; } + public int? BuildCount { get; set; } [JsonPropertyName("tm")] - public int Tm { get; set; } + public int? Tm { get; set; } [JsonPropertyName("reload")] - public int Reload { get; set; } + public int? Reload { get; set; } } public enum OfferOwnerType diff --git a/Core/Models/Eft/Ragfair/SendRagfairReportRequestData.cs b/Core/Models/Eft/Ragfair/SendRagfairReportRequestData.cs index 27e05b6b..d69e542e 100644 --- a/Core/Models/Eft/Ragfair/SendRagfairReportRequestData.cs +++ b/Core/Models/Eft/Ragfair/SendRagfairReportRequestData.cs @@ -4,6 +4,6 @@ namespace Core.Models.Eft.Ragfair; public class SendRagfairReportRequestData { - [JsonPropertyName("offerId")] - public int OfferId { get; set; } + [JsonPropertyName("offerId")] + public int? OfferId { get; set; } } \ No newline at end of file diff --git a/Core/Models/Eft/Ragfair/StorePlayerOfferTaxAmountRequestData.cs b/Core/Models/Eft/Ragfair/StorePlayerOfferTaxAmountRequestData.cs index fba10c63..ed51b0d2 100644 --- a/Core/Models/Eft/Ragfair/StorePlayerOfferTaxAmountRequestData.cs +++ b/Core/Models/Eft/Ragfair/StorePlayerOfferTaxAmountRequestData.cs @@ -4,15 +4,15 @@ namespace Core.Models.Eft.Ragfair; public class StorePlayerOfferTaxAmountRequestData { - [JsonPropertyName("id")] - public string Id { get; set; } + [JsonPropertyName("id")] + public string? Id { get; set; } - [JsonPropertyName("tpl")] - public string Tpl { get; set; } + [JsonPropertyName("tpl")] + public string? Tpl { get; set; } - [JsonPropertyName("count")] - public int Count { get; set; } + [JsonPropertyName("count")] + public int? Count { get; set; } - [JsonPropertyName("fee")] - public double Fee { get; set; } + [JsonPropertyName("fee")] + public double? Fee { get; set; } } \ No newline at end of file