refactor: rename UserWalletChangeLog→UserWalletHistory, add History interceptor & migration
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 9m11s

- Rename UserWalletChangeLog to UserWalletHistory across 54+ files (entities, configs, DTOs, commands, queries, protos, services)
- Rename 34 files and 11 directories accordingly
- Rename proto file userwalletchangelog.proto → userwallethistory.proto
- Add IHasHistory<T> generic interface for history auto-tracking
- Implement IHasHistory<PackageHistory> on Package entity
- Add HistoryTrackingSaveChangesInterceptor (reflection-based, auto-fills Old* values from OriginalValues)
- Wire interceptor in DI and ApplicationDbContext
- Add EF migration Q27_HistoryTables_And_RenameWalletHistory:
  * RenameTable UserWalletChangeLogs → UserWalletHistories (preserves data)
  * Rename PK, FK constraints and indexes via sp_rename
  * CreateTable ClubMembershipCycleHistories + PackageHistories
This commit is contained in:
masoodafar-web
2026-02-27 06:22:15 +03:30
parent fdbb91d2e1
commit 10d2ca20d1
86 changed files with 6255 additions and 472 deletions
@@ -51,9 +51,9 @@ service UserWalletContract
get: "/Customer/GetWallet"
};
};
rpc GetCustomerWalletChangeLog(GetCustomerWalletChangeLogRequest) returns (GetCustomerWalletChangeLogResponse){
rpc GetCustomerWalletHistory(GetCustomerWalletHistoryRequest) returns (GetCustomerWalletHistoryResponse){
option (google.api.http) = {
post: "/Customer/GetWalletChangeLog"
post: "/Customer/GetWalletHistory"
body: "*"
};
};
@@ -167,19 +167,19 @@ message GetCustomerWalletResponse
int32 wallet_mode = 4; // 0=Normal, 1=Magic
}
message GetCustomerWalletChangeLogRequest
message GetCustomerWalletHistoryRequest
{
google.protobuf.Int64Value reference_id = 1;
google.protobuf.BoolValue is_increase = 2;
}
message GetCustomerWalletChangeLogResponse
message GetCustomerWalletHistoryResponse
{
messages.MetaData meta_data = 1;
repeated CustomerWalletChangeLogModel models = 2;
repeated CustomerWalletHistoryModel models = 2;
}
message CustomerWalletChangeLogModel
message CustomerWalletHistoryModel
{
int64 current_balance = 1;
int64 change_value = 2;