Enhance user settings management by adding new properties and updating related functionality

This commit introduces additional user settings properties, including TrendStrongAgreementThreshold, SignalAgreementThreshold, AllowSignalTrendOverride, and DefaultExchange, to the User entity and associated DTOs. The UserController and UserService are updated to handle these new settings, allowing users to customize their trading configurations more effectively. Database migrations are also included to ensure proper schema updates for the new fields.
This commit is contained in:
2025-12-30 06:48:08 +07:00
parent 79d8a381d9
commit aa3b06bbe4
26 changed files with 5909 additions and 57 deletions

View File

@@ -365,6 +365,18 @@ public class UserService : IUserService
if (settings.MinimumConfidence.HasValue)
user.MinimumConfidence = settings.MinimumConfidence.Value;
if (settings.TrendStrongAgreementThreshold.HasValue)
user.TrendStrongAgreementThreshold = settings.TrendStrongAgreementThreshold.Value;
if (settings.SignalAgreementThreshold.HasValue)
user.SignalAgreementThreshold = settings.SignalAgreementThreshold.Value;
if (settings.AllowSignalTrendOverride.HasValue)
user.AllowSignalTrendOverride = settings.AllowSignalTrendOverride.Value;
if (settings.DefaultExchange.HasValue)
user.DefaultExchange = settings.DefaultExchange.Value;
await _userRepository.SaveOrUpdateUserAsync(user);
return user;
}