Add user settings update functionality in UserController and UserService

Implement a new endpoint in UserController to allow users to update their settings. The UserService is updated to handle the logic for updating user settings, including partial updates for various fields. Additionally, the User entity and database schema are modified to accommodate new user settings properties, ensuring persistence and retrieval of user preferences.
This commit is contained in:
2025-12-30 05:54:15 +07:00
parent 95e60108af
commit 79d8a381d9
13 changed files with 2022 additions and 2 deletions

View File

@@ -1,5 +1,6 @@
using Managing.Domain.Accounts;
using Orleans;
using static Managing.Common.Enums;
namespace Managing.Domain.Users;
@@ -23,4 +24,13 @@ public class User
[Id(7)] public bool IsAdmin { get; set; } = false;
[Id(8)] public DateTimeOffset? LastConnectionDate { get; set; }
// User Settings
[Id(9)] public decimal? LowEthAmountAlert { get; set; }
[Id(10)] public bool EnableAutoswap { get; set; } = false;
[Id(11)] public decimal? AutoswapAmount { get; set; }
[Id(12)] public int? MaxWaitingTimeForPositionToGetFilledSeconds { get; set; }
[Id(13)] public decimal? MaxTxnGasFeePerPosition { get; set; }
[Id(14)] public bool IsGmxEnabled { get; set; } = false;
[Id(15)] public Confidence? MinimumConfidence { get; set; }
}