diff --git a/SVSim.EmulatedEntrypoint/Models/Dtos/Friend/ApplyIdRequest.cs b/SVSim.EmulatedEntrypoint/Models/Dtos/Friend/ApplyIdRequest.cs new file mode 100644 index 0000000..335c13b --- /dev/null +++ b/SVSim.EmulatedEntrypoint/Models/Dtos/Friend/ApplyIdRequest.cs @@ -0,0 +1,11 @@ +using System.Text.Json.Serialization; +using MessagePack; + +namespace SVSim.EmulatedEntrypoint.Models.Dtos.Friend; + +[MessagePackObject] +public sealed class ApplyIdRequest +{ + [JsonPropertyName("apply_id")][Key("apply_id")] + public int ApplyId { get; set; } +} diff --git a/SVSim.EmulatedEntrypoint/Models/Dtos/Friend/FriendApplyEntryDto.cs b/SVSim.EmulatedEntrypoint/Models/Dtos/Friend/FriendApplyEntryDto.cs new file mode 100644 index 0000000..80d25b0 --- /dev/null +++ b/SVSim.EmulatedEntrypoint/Models/Dtos/Friend/FriendApplyEntryDto.cs @@ -0,0 +1,23 @@ +using System.Text.Json.Serialization; +using MessagePack; + +namespace SVSim.EmulatedEntrypoint.Models.Dtos.Friend; + +[MessagePackObject] +public sealed class FriendApplyEntryDto +{ + [JsonPropertyName("id")][Key("id")] public int Id { get; set; } + [JsonPropertyName("viewer_id")][Key("viewer_id")] public int ViewerId { get; set; } + [JsonPropertyName("name")][Key("name")] public string Name { get; set; } = string.Empty; + [JsonPropertyName("country_code")][Key("country_code")] public string CountryCode { get; set; } = string.Empty; + [JsonPropertyName("rank")][Key("rank")] public int Rank { get; set; } + [JsonPropertyName("emblem_id")][Key("emblem_id")] public long EmblemId { get; set; } + [JsonPropertyName("degree_id")][Key("degree_id")] public int DegreeId { get; set; } + [JsonPropertyName("last_play_time")][Key("last_play_time")] public string LastPlayTime { get; set; } = string.Empty; + [JsonPropertyName("create_time")][Key("create_time")] public string CreateTime { get; set; } = string.Empty; + + /// Only emitted when non-zero (matches prod's optional shape). + [JsonPropertyName("mission_type")][Key("mission_type")] + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] + public int MissionType { get; set; } +} diff --git a/SVSim.EmulatedEntrypoint/Models/Dtos/Friend/FriendEntryDto.cs b/SVSim.EmulatedEntrypoint/Models/Dtos/Friend/FriendEntryDto.cs new file mode 100644 index 0000000..9404f6f --- /dev/null +++ b/SVSim.EmulatedEntrypoint/Models/Dtos/Friend/FriendEntryDto.cs @@ -0,0 +1,29 @@ +using System.Text.Json.Serialization; +using MessagePack; + +namespace SVSim.EmulatedEntrypoint.Models.Dtos.Friend; + +/// +/// One friend entry. Mirrors the prod capture's 15-field shape exactly — numeric fields +/// (viewer_id, rank, emblem_id, degree_id) ship as native ints; everything else as +/// stringified ints / strings. +/// +[MessagePackObject] +public sealed class FriendEntryDto +{ + [JsonPropertyName("device_type")][Key("device_type")] public string DeviceType { get; set; } = "0"; + [JsonPropertyName("name")][Key("name")] public string Name { get; set; } = string.Empty; + [JsonPropertyName("country_code")][Key("country_code")] public string CountryCode { get; set; } = string.Empty; + [JsonPropertyName("max_friend")][Key("max_friend")] public string MaxFriend { get; set; } = "0"; + [JsonPropertyName("last_play_time")][Key("last_play_time")] public string LastPlayTime { get; set; } = string.Empty; + [JsonPropertyName("is_received_two_pick_mission")][Key("is_received_two_pick_mission")] public string IsReceivedTwoPickMission { get; set; } = "0"; + [JsonPropertyName("birth")][Key("birth")] public string Birth { get; set; } = "0"; + [JsonPropertyName("mission_change_time")][Key("mission_change_time")] public string MissionChangeTime { get; set; } = string.Empty; + [JsonPropertyName("mission_receive_type")][Key("mission_receive_type")] public string MissionReceiveType { get; set; } = "0"; + [JsonPropertyName("is_official")][Key("is_official")] public string IsOfficial { get; set; } = "0"; + [JsonPropertyName("is_official_mark_displayed")][Key("is_official_mark_displayed")] public string IsOfficialMarkDisplayed { get; set; } = "0"; + [JsonPropertyName("viewer_id")][Key("viewer_id")] public int ViewerId { get; set; } + [JsonPropertyName("rank")][Key("rank")] public int Rank { get; set; } + [JsonPropertyName("emblem_id")][Key("emblem_id")] public long EmblemId { get; set; } + [JsonPropertyName("degree_id")][Key("degree_id")] public int DegreeId { get; set; } +} diff --git a/SVSim.EmulatedEntrypoint/Models/Dtos/Friend/FriendInfoResponse.cs b/SVSim.EmulatedEntrypoint/Models/Dtos/Friend/FriendInfoResponse.cs new file mode 100644 index 0000000..19e15b3 --- /dev/null +++ b/SVSim.EmulatedEntrypoint/Models/Dtos/Friend/FriendInfoResponse.cs @@ -0,0 +1,12 @@ +using System.Text.Json.Serialization; +using MessagePack; + +namespace SVSim.EmulatedEntrypoint.Models.Dtos.Friend; + +[MessagePackObject] +public sealed class FriendInfoResponse +{ + [JsonPropertyName("friends")][Key("friends")] public List Friends { get; set; } = new(); + [JsonPropertyName("friend_count")][Key("friend_count")] public int FriendCount { get; set; } + [JsonPropertyName("friend_max_count")][Key("friend_max_count")] public int FriendMaxCount { get; set; } +} diff --git a/SVSim.EmulatedEntrypoint/Models/Dtos/Friend/PlayedTogetherEntryDto.cs b/SVSim.EmulatedEntrypoint/Models/Dtos/Friend/PlayedTogetherEntryDto.cs new file mode 100644 index 0000000..178bdfc --- /dev/null +++ b/SVSim.EmulatedEntrypoint/Models/Dtos/Friend/PlayedTogetherEntryDto.cs @@ -0,0 +1,23 @@ +using System.Text.Json.Serialization; +using MessagePack; + +namespace SVSim.EmulatedEntrypoint.Models.Dtos.Friend; + +[MessagePackObject] +public sealed class PlayedTogetherEntryDto +{ + [JsonPropertyName("viewer_id")][Key("viewer_id")] public int ViewerId { get; set; } + [JsonPropertyName("name")][Key("name")] public string Name { get; set; } = string.Empty; + [JsonPropertyName("country_code")][Key("country_code")] public string CountryCode { get; set; } = string.Empty; + [JsonPropertyName("rank")][Key("rank")] public int Rank { get; set; } + [JsonPropertyName("emblem_id")][Key("emblem_id")] public long EmblemId { get; set; } + [JsonPropertyName("degree_id")][Key("degree_id")] public int DegreeId { get; set; } + [JsonPropertyName("last_play_time")][Key("last_play_time")] public string LastPlayTime { get; set; } = string.Empty; + [JsonPropertyName("played_time")][Key("played_time")] public string PlayedTime { get; set; } = string.Empty; + [JsonPropertyName("friend_status")][Key("friend_status")] public int FriendStatus { get; set; } + [JsonPropertyName("friend_apply_id")][Key("friend_apply_id")] public int FriendApplyId { get; set; } + [JsonPropertyName("played_mode")][Key("played_mode")] public int PlayedMode { get; set; } + [JsonPropertyName("battle_type")][Key("battle_type")] public int BattleType { get; set; } + [JsonPropertyName("deck_format")][Key("deck_format")] public int DeckFormat { get; set; } + [JsonPropertyName("two_pick_type")][Key("two_pick_type")] public int TwoPickType { get; set; } +} diff --git a/SVSim.EmulatedEntrypoint/Models/Dtos/Friend/PlayedTogetherInfoResponse.cs b/SVSim.EmulatedEntrypoint/Models/Dtos/Friend/PlayedTogetherInfoResponse.cs new file mode 100644 index 0000000..0071699 --- /dev/null +++ b/SVSim.EmulatedEntrypoint/Models/Dtos/Friend/PlayedTogetherInfoResponse.cs @@ -0,0 +1,10 @@ +using System.Text.Json.Serialization; +using MessagePack; + +namespace SVSim.EmulatedEntrypoint.Models.Dtos.Friend; + +[MessagePackObject] +public sealed class PlayedTogetherInfoResponse +{ + [JsonPropertyName("histories")][Key("histories")] public List Histories { get; set; } = new(); +} diff --git a/SVSim.EmulatedEntrypoint/Models/Dtos/Friend/ReceiveApplyInfoResponse.cs b/SVSim.EmulatedEntrypoint/Models/Dtos/Friend/ReceiveApplyInfoResponse.cs new file mode 100644 index 0000000..eefb0e7 --- /dev/null +++ b/SVSim.EmulatedEntrypoint/Models/Dtos/Friend/ReceiveApplyInfoResponse.cs @@ -0,0 +1,11 @@ +using System.Text.Json.Serialization; +using MessagePack; + +namespace SVSim.EmulatedEntrypoint.Models.Dtos.Friend; + +[MessagePackObject] +public sealed class ReceiveApplyInfoResponse +{ + [JsonPropertyName("receive_applies")][Key("receive_applies")] public List ReceiveApplies { get; set; } = new(); + [JsonPropertyName("approve_apply_count")][Key("approve_apply_count")] public int ApproveApplyCount { get; set; } +} diff --git a/SVSim.EmulatedEntrypoint/Models/Dtos/Friend/RejectFriendRequest.cs b/SVSim.EmulatedEntrypoint/Models/Dtos/Friend/RejectFriendRequest.cs new file mode 100644 index 0000000..f8a8c89 --- /dev/null +++ b/SVSim.EmulatedEntrypoint/Models/Dtos/Friend/RejectFriendRequest.cs @@ -0,0 +1,11 @@ +using System.Text.Json.Serialization; +using MessagePack; + +namespace SVSim.EmulatedEntrypoint.Models.Dtos.Friend; + +[MessagePackObject] +public sealed class RejectFriendRequest +{ + [JsonPropertyName("friend_id")][Key("friend_id")] + public int FriendId { get; set; } +} diff --git a/SVSim.EmulatedEntrypoint/Models/Dtos/Friend/SearchUserRequest.cs b/SVSim.EmulatedEntrypoint/Models/Dtos/Friend/SearchUserRequest.cs new file mode 100644 index 0000000..05a7133 --- /dev/null +++ b/SVSim.EmulatedEntrypoint/Models/Dtos/Friend/SearchUserRequest.cs @@ -0,0 +1,11 @@ +using System.Text.Json.Serialization; +using MessagePack; + +namespace SVSim.EmulatedEntrypoint.Models.Dtos.Friend; + +[MessagePackObject] +public sealed class SearchUserRequest +{ + [JsonPropertyName("search_viewer_id")][Key("search_viewer_id")] + public int SearchViewerId { get; set; } +} diff --git a/SVSim.EmulatedEntrypoint/Models/Dtos/Friend/SearchUserResponse.cs b/SVSim.EmulatedEntrypoint/Models/Dtos/Friend/SearchUserResponse.cs new file mode 100644 index 0000000..3b62f36 --- /dev/null +++ b/SVSim.EmulatedEntrypoint/Models/Dtos/Friend/SearchUserResponse.cs @@ -0,0 +1,15 @@ +using System.Text.Json.Serialization; +using MessagePack; + +namespace SVSim.EmulatedEntrypoint.Models.Dtos.Friend; + +/// +/// Search result. When no match, serializes as {} +/// (an empty JSON object). When matched, it's a populated . +/// +[MessagePackObject] +public sealed class SearchUserResponse +{ + [JsonPropertyName("user_info")][Key("user_info")] + public object UserInfo { get; set; } = new(); +} diff --git a/SVSim.EmulatedEntrypoint/Models/Dtos/Friend/SendApplyInfoResponse.cs b/SVSim.EmulatedEntrypoint/Models/Dtos/Friend/SendApplyInfoResponse.cs new file mode 100644 index 0000000..b0e906b --- /dev/null +++ b/SVSim.EmulatedEntrypoint/Models/Dtos/Friend/SendApplyInfoResponse.cs @@ -0,0 +1,12 @@ +using System.Text.Json.Serialization; +using MessagePack; + +namespace SVSim.EmulatedEntrypoint.Models.Dtos.Friend; + +[MessagePackObject] +public sealed class SendApplyInfoResponse +{ + [JsonPropertyName("send_applies")][Key("send_applies")] public List SendApplies { get; set; } = new(); + [JsonPropertyName("remaining_apply_count")][Key("remaining_apply_count")] public int RemainingApplyCount { get; set; } + [JsonPropertyName("send_apply_max_count")][Key("send_apply_max_count")] public int SendApplyMaxCount { get; set; } +} diff --git a/SVSim.EmulatedEntrypoint/Models/Dtos/Friend/SendApplyRequest.cs b/SVSim.EmulatedEntrypoint/Models/Dtos/Friend/SendApplyRequest.cs new file mode 100644 index 0000000..a612174 --- /dev/null +++ b/SVSim.EmulatedEntrypoint/Models/Dtos/Friend/SendApplyRequest.cs @@ -0,0 +1,11 @@ +using System.Text.Json.Serialization; +using MessagePack; + +namespace SVSim.EmulatedEntrypoint.Models.Dtos.Friend; + +[MessagePackObject] +public sealed class SendApplyRequest +{ + [JsonPropertyName("friend_id")][Key("friend_id")] + public int FriendId { get; set; } +}