feat: Implement customer profile and referral queries

- Add GetCustomerProfileResponseDto for retrieving customer profile information.
- Create GetCustomerReferralsQuery and GetCustomerReferralsQueryHandler to fetch customer referrals with pagination and filtering options.
- Introduce GetCustomerReferralsResponseDto to structure the response for customer referrals.
- Implement GetCustomerSettingsQuery and GetCustomerSettingsQueryHandler to retrieve user settings.
- Add GetCustomerOrder and GetCustomerOrderQueryHandler for fetching specific customer orders.
- Create GetCustomerOrderHistoryQuery and GetCustomerOrderHistoryQueryHandler to retrieve order history with filtering options.
- Implement GetCustomerOrdersQuery and GetCustomerOrdersQueryHandler for fetching multiple customer orders with filters.
- Add GetCustomerWalletChangeLogQuery and GetCustomerWalletChangeLogQueryHandler for retrieving wallet change logs.
- Implement GetCustomerWithdrawalSettingsQuery and GetCustomerWithdrawalSettingsQueryHandler for fetching withdrawal settings.
- Create GetCustomerWithdrawalsQuery and GetCustomerWithdrawalsQueryHandler to retrieve customer withdrawal requests.
This commit is contained in:
masoodafar-web
2026-02-05 23:01:50 +03:30
parent b41342dcad
commit b2d676b555
96 changed files with 4822 additions and 589 deletions
@@ -49,6 +49,38 @@ service UserAddressContract
body: "*"
};
};
// ============= Customer-specific Methods =============
rpc GetCustomerAddresses(GetCustomerAddressesRequest) returns (GetCustomerAddressesResponse){
option (google.api.http) = {
get: "/Customer/GetAddresses"
};
};
rpc CreateCustomerAddress(CreateCustomerAddressRequest) returns (CreateCustomerAddressResponse){
option (google.api.http) = {
post: "/Customer/CreateAddress"
body: "*"
};
};
rpc UpdateCustomerAddress(UpdateCustomerAddressRequest) returns (google.protobuf.Empty){
option (google.api.http) = {
put: "/Customer/UpdateAddress"
body: "*"
};
};
rpc DeleteCustomerAddress(DeleteCustomerAddressRequest) returns (google.protobuf.Empty){
option (google.api.http) = {
delete: "/Customer/DeleteAddress"
body: "*"
};
};
rpc SetCustomerDefaultAddress(SetCustomerDefaultAddressRequest) returns (google.protobuf.Empty){
option (google.api.http) = {
post: "/Customer/SetDefaultAddress"
body: "*"
};
};
}
message CreateNewUserAddressRequest
{
@@ -126,3 +158,59 @@ message SetAddressAsDefaultRequest
{
int64 id = 1;
}
// ============= Customer Messages =============
message GetCustomerAddressesRequest
{
// user_id will be extracted from JWT token
}
message GetCustomerAddressesResponse
{
repeated CustomerAddressModel models = 1;
}
message CustomerAddressModel
{
int64 id = 1;
string title = 2;
string address = 3;
string postal_code = 4;
bool is_default = 5;
int64 city_id = 6;
string city_name = 7;
string province_name = 8;
}
message CreateCustomerAddressRequest
{
string title = 1;
string address = 2;
string postal_code = 3;
bool is_default = 4;
int64 city_id = 5;
// user_id will be extracted from JWT token
}
message CreateCustomerAddressResponse
{
int64 id = 1;
string message = 2;
}
message UpdateCustomerAddressRequest
{
int64 id = 1;
string title = 2;
string address = 3;
string postal_code = 4;
bool is_default = 5;
int64 city_id = 6;
// user_id will be extracted from JWT token
}
message DeleteCustomerAddressRequest
{
int64 id = 1;
// user_id will be extracted from JWT token
}
message SetCustomerDefaultAddressRequest
{
int64 id = 1;
// user_id will be extracted from JWT token
}