refactor: rename UserWalletChangeLog→UserWalletHistory, add History interceptor & migration
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 9m11s
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:
@@ -0,0 +1,124 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package userwallethistory;
|
||||
|
||||
import "public_messages.proto";
|
||||
import "google/protobuf/empty.proto";
|
||||
import "google/protobuf/wrappers.proto";
|
||||
import "google/protobuf/duration.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "google/api/annotations.proto";
|
||||
|
||||
option csharp_namespace = "CMSMicroservice.Protobuf.Protos.UserWalletHistory";
|
||||
|
||||
service UserWalletHistoryContract
|
||||
{
|
||||
rpc CreateNewUserWalletHistory(CreateNewUserWalletHistoryRequest) returns (CreateNewUserWalletHistoryResponse){
|
||||
option (google.api.http) = {
|
||||
post: "/CreateNewUserWalletHistory"
|
||||
body: "*"
|
||||
};
|
||||
};
|
||||
rpc UpdateUserWalletHistory(UpdateUserWalletHistoryRequest) returns (google.protobuf.Empty){
|
||||
option (google.api.http) = {
|
||||
put: "/UpdateUserWalletHistory"
|
||||
body: "*"
|
||||
};
|
||||
};
|
||||
rpc DeleteUserWalletHistory(DeleteUserWalletHistoryRequest) returns (google.protobuf.Empty){
|
||||
option (google.api.http) = {
|
||||
delete: "/DeleteUserWalletHistory"
|
||||
body: "*"
|
||||
};
|
||||
};
|
||||
rpc GetUserWalletHistory(GetUserWalletHistoryRequest) returns (GetUserWalletHistoryResponse){
|
||||
option (google.api.http) = {
|
||||
get: "/GetUserWalletHistory"
|
||||
|
||||
};
|
||||
};
|
||||
rpc GetAllUserWalletHistoryByFilter(GetAllUserWalletHistoryByFilterRequest) returns (GetAllUserWalletHistoryByFilterResponse){
|
||||
option (google.api.http) = {
|
||||
get: "/GetAllUserWalletHistoryByFilter"
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
message CreateNewUserWalletHistoryRequest
|
||||
{
|
||||
int64 wallet_id = 1;
|
||||
int64 current_balance = 2;
|
||||
int64 change_value = 3;
|
||||
int64 current_network_balance = 4;
|
||||
int64 change_nerwork_value = 5;
|
||||
bool is_increase = 6;
|
||||
google.protobuf.Int64Value refrence_id = 7;
|
||||
}
|
||||
message CreateNewUserWalletHistoryResponse
|
||||
{
|
||||
int64 id = 1;
|
||||
}
|
||||
message UpdateUserWalletHistoryRequest
|
||||
{
|
||||
int64 id = 1;
|
||||
int64 wallet_id = 2;
|
||||
int64 current_balance = 3;
|
||||
int64 change_value = 4;
|
||||
int64 current_network_balance = 5;
|
||||
int64 change_nerwork_value = 6;
|
||||
bool is_increase = 7;
|
||||
google.protobuf.Int64Value refrence_id = 8;
|
||||
}
|
||||
message DeleteUserWalletHistoryRequest
|
||||
{
|
||||
int64 id = 1;
|
||||
}
|
||||
message GetUserWalletHistoryRequest
|
||||
{
|
||||
int64 id = 1;
|
||||
}
|
||||
message GetUserWalletHistoryResponse
|
||||
{
|
||||
int64 id = 1;
|
||||
int64 wallet_id = 2;
|
||||
int64 current_balance = 3;
|
||||
int64 change_value = 4;
|
||||
int64 current_network_balance = 5;
|
||||
int64 change_nerwork_value = 6;
|
||||
bool is_increase = 7;
|
||||
google.protobuf.Int64Value refrence_id = 8;
|
||||
google.protobuf.Timestamp created_at = 9;
|
||||
}
|
||||
message GetAllUserWalletHistoryByFilterRequest
|
||||
{
|
||||
messages.PaginationState pagination_state = 1;
|
||||
google.protobuf.StringValue sort_by = 2;
|
||||
GetAllUserWalletHistoryByFilterFilter filter = 3;
|
||||
}
|
||||
message GetAllUserWalletHistoryByFilterFilter
|
||||
{
|
||||
google.protobuf.Int64Value id = 1;
|
||||
google.protobuf.Int64Value wallet_id = 2;
|
||||
google.protobuf.Int64Value current_balance = 3;
|
||||
google.protobuf.Int64Value change_value = 4;
|
||||
google.protobuf.BoolValue is_increase = 5;
|
||||
google.protobuf.Int64Value refrence_id = 6;
|
||||
google.protobuf.Int64Value user_id = 7;
|
||||
}
|
||||
message GetAllUserWalletHistoryByFilterResponse
|
||||
{
|
||||
messages.MetaData meta_data = 1;
|
||||
repeated GetAllUserWalletHistoryByFilterResponseModel models = 2;
|
||||
}
|
||||
message GetAllUserWalletHistoryByFilterResponseModel
|
||||
{
|
||||
int64 id = 1;
|
||||
int64 wallet_id = 2;
|
||||
int64 current_balance = 3;
|
||||
int64 change_value = 4;
|
||||
int64 current_network_balance = 5;
|
||||
int64 change_nerwork_value = 6;
|
||||
bool is_increase = 7;
|
||||
google.protobuf.Int64Value refrence_id = 8;
|
||||
google.protobuf.Timestamp created_at = 9;
|
||||
}
|
||||
Reference in New Issue
Block a user