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:
@@ -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; }
|
||||
}
|
||||
Reference in New Issue
Block a user