feat(friend): IFriendService + IPlayedTogetherWriter + DTO records
Task 3: service contract (interface + DTOs) and FriendService skeleton. All methods throw NotImplementedException; Tasks 4-6 fill in the logic. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
69
SVSim.Database/Services/Friend/FriendService.cs
Normal file
69
SVSim.Database/Services/Friend/FriendService.cs
Normal file
@@ -0,0 +1,69 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace SVSim.Database.Services.Friend;
|
||||
|
||||
public sealed class FriendService : IFriendService, IPlayedTogetherWriter
|
||||
{
|
||||
internal const int FriendMaxCount = 110;
|
||||
internal const int SendApplyMaxCount = 110;
|
||||
internal const int PlayedTogetherRetention = 50;
|
||||
|
||||
// Cosmetic field defaults matching the prod capture's "no campaign, normal player" state.
|
||||
internal const string DefaultDeviceType = "2";
|
||||
internal const string DefaultMaxFriend = "110";
|
||||
internal const string DefaultIsReceivedTwoPickMission = "1";
|
||||
internal const string DefaultBirth = "0";
|
||||
internal const string DefaultMissionChangeTime = "2017-09-15 02:36:09";
|
||||
internal const string DefaultMissionReceiveType = "0";
|
||||
internal const string DefaultIsOfficial = "0";
|
||||
internal const string DefaultIsOfficialMarkDisplayed = "0";
|
||||
|
||||
private readonly SVSimDbContext _db;
|
||||
private readonly ILogger<FriendService> _log;
|
||||
|
||||
public FriendService(SVSimDbContext db, ILogger<FriendService> log)
|
||||
{
|
||||
_db = db;
|
||||
_log = log;
|
||||
}
|
||||
|
||||
public Task<FriendInfoResult> GetFriendsAsync(long viewerId, CancellationToken ct) =>
|
||||
throw new NotImplementedException();
|
||||
|
||||
public Task<ReceiveApplyInfoResult> GetReceiveAppliesAsync(long viewerId, CancellationToken ct) =>
|
||||
throw new NotImplementedException();
|
||||
|
||||
public Task<SendApplyInfoResult> GetSendAppliesAsync(long viewerId, CancellationToken ct) =>
|
||||
throw new NotImplementedException();
|
||||
|
||||
public Task<PlayedTogetherResult> GetPlayedTogetherAsync(long viewerId, CancellationToken ct) =>
|
||||
throw new NotImplementedException();
|
||||
|
||||
public Task<FriendEntry?> SearchAsync(long viewerId, int targetViewerId, CancellationToken ct) =>
|
||||
throw new NotImplementedException();
|
||||
|
||||
public Task SendApplyAsync(long viewerId, int targetViewerId, CancellationToken ct) =>
|
||||
throw new NotImplementedException();
|
||||
|
||||
public Task ApproveApplyAsync(long viewerId, int applyId, CancellationToken ct) =>
|
||||
throw new NotImplementedException();
|
||||
|
||||
public Task RejectApplyAsync(long viewerId, int applyId, CancellationToken ct) =>
|
||||
throw new NotImplementedException();
|
||||
|
||||
public Task CancelApplyAsync(long viewerId, int applyId, CancellationToken ct) =>
|
||||
throw new NotImplementedException();
|
||||
|
||||
public Task RejectAllAppliesAsync(long viewerId, CancellationToken ct) =>
|
||||
throw new NotImplementedException();
|
||||
|
||||
public Task CancelAllAppliesAsync(long viewerId, CancellationToken ct) =>
|
||||
throw new NotImplementedException();
|
||||
|
||||
public Task RejectFriendAsync(long viewerId, int targetViewerId, CancellationToken ct) =>
|
||||
throw new NotImplementedException();
|
||||
|
||||
public Task RecordAsync(long ownerViewerId, long opponentViewerId, BattleParticipationContext ctx, CancellationToken ct) =>
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
Reference in New Issue
Block a user