Feat: Add Referral Code System #35
@ -43,6 +43,7 @@ message PermissionList {
|
|||||||
|
|
||||||
message UserSendOtpReq {
|
message UserSendOtpReq {
|
||||||
string mobile = 1;
|
string mobile = 1;
|
||||||
|
string referral_code = 2;
|
||||||
}
|
}
|
||||||
message UserSendOtpRes {
|
message UserSendOtpRes {
|
||||||
int64 expired_at = 1;
|
int64 expired_at = 1;
|
||||||
@ -55,6 +56,7 @@ message UserSendOtpRes {
|
|||||||
message UserLoginReq {
|
message UserLoginReq {
|
||||||
string mobile = 1;
|
string mobile = 1;
|
||||||
string otp_code = 2;
|
string otp_code = 2;
|
||||||
|
string referral_code = 3;
|
||||||
}
|
}
|
||||||
message UserRefreshTokenReq {
|
message UserRefreshTokenReq {
|
||||||
string refresh_token = 1;
|
string refresh_token = 1;
|
||||||
@ -128,6 +130,7 @@ message User {
|
|||||||
string email = 4;
|
string email = 4;
|
||||||
UserStatus status = 5;
|
UserStatus status = 5;
|
||||||
repeated int64 roles = 6;
|
repeated int64 roles = 6;
|
||||||
|
int64 referrer_user_id = 7;
|
||||||
}
|
}
|
||||||
|
|
||||||
message UserAddress {
|
message UserAddress {
|
||||||
@ -185,6 +188,7 @@ message UserIdentityBasic {
|
|||||||
string first_name = 4;
|
string first_name = 4;
|
||||||
string last_name = 5;
|
string last_name = 5;
|
||||||
string wallet_address = 6;
|
string wallet_address = 6;
|
||||||
|
bool is_identity_verified = 7;
|
||||||
}
|
}
|
||||||
|
|
||||||
message UserUpdateIdentityReq {
|
message UserUpdateIdentityReq {
|
||||||
|
|||||||
@ -51,6 +51,7 @@ enum ErrCode {
|
|||||||
BANK_INFO_NOT_FOUND = 3007;
|
BANK_INFO_NOT_FOUND = 3007;
|
||||||
RECIPIENT_NOT_FOUND = 3008;
|
RECIPIENT_NOT_FOUND = 3008;
|
||||||
USER_NOT_FOUND = 3009;
|
USER_NOT_FOUND = 3009;
|
||||||
|
INVALID_REFERRAL_CODE = 3011;
|
||||||
MARKET_AGREEMENT_ALREADY_ACCEPTED = 3010;
|
MARKET_AGREEMENT_ALREADY_ACCEPTED = 3010;
|
||||||
|
|
||||||
// Resource state errors
|
// Resource state errors
|
||||||
|
|||||||
@ -17,4 +17,7 @@ service InternalWalletSrv {
|
|||||||
|
|
||||||
// Calculate stellar pub-priv key based on national id
|
// Calculate stellar pub-priv key based on national id
|
||||||
rpc GetPublicKeyByNationalID(NationalIDReq) returns (PubKeyRes);
|
rpc GetPublicKeyByNationalID(NationalIDReq) returns (PubKeyRes);
|
||||||
|
|
||||||
|
// Commission Logs
|
||||||
|
rpc InitReferrerCommissionLog(InitReferrerCommissionLogIn) returns (base.v1.Empty);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import "auth/v1/msg.proto";
|
|||||||
import "base/v1/msg.proto";
|
import "base/v1/msg.proto";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
INTERNAL DATA
|
INTERNAL DATA;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
message InternalTransactionData {
|
message InternalTransactionData {
|
||||||
@ -355,6 +355,7 @@ enum TransactionType {
|
|||||||
IRT_DEPOSIT = 13;
|
IRT_DEPOSIT = 13;
|
||||||
IRT_WITHDRAWAL = 14;
|
IRT_WITHDRAWAL = 14;
|
||||||
COMMISSION = 15;
|
COMMISSION = 15;
|
||||||
|
REFERRAL_COMMISSION = 16;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum TransactionStatus {
|
enum TransactionStatus {
|
||||||
@ -442,7 +443,7 @@ message TransferAssetRes {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Redeem Token
|
Redeem Token;
|
||||||
*/
|
*/
|
||||||
message RedeemTokenReq {
|
message RedeemTokenReq {
|
||||||
auth.v1.InternalIAM iam = 1;
|
auth.v1.InternalIAM iam = 1;
|
||||||
@ -497,7 +498,7 @@ message PubKeyRes {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Network Details
|
Network Details;
|
||||||
*/
|
*/
|
||||||
enum NetworkType {
|
enum NetworkType {
|
||||||
UNKNOWN_NETWORK_TYPE = 0;
|
UNKNOWN_NETWORK_TYPE = 0;
|
||||||
@ -581,6 +582,38 @@ message CommissionRes {
|
|||||||
uint64 commission_log_id = 1;
|
uint64 commission_log_id = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message InitReferrerCommissionLogIn {
|
||||||
|
int64 referrer_id = 1;
|
||||||
|
int64 user_id = 2;
|
||||||
|
double amount = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ReferrerCommissionLogOut {
|
||||||
|
double amount = 1;
|
||||||
|
string mobile = 2;
|
||||||
|
bool is_identity_verified = 3;
|
||||||
|
double commission_percentage = 4;
|
||||||
|
}
|
||||||
|
message ReferrerCommissionLogsList {
|
||||||
|
repeated ReferrerCommissionLogOut list = 1;
|
||||||
|
uint32 page_no = 2;
|
||||||
|
uint32 page_size = 3;
|
||||||
|
uint32 total_count = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message TotalReferralCommissionIn {
|
||||||
|
int64 referrer_id = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message TotalReferralCommissionOut {
|
||||||
|
double claimed = 1;
|
||||||
|
double unclaimed = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ClaimReferralCommissionIn {
|
||||||
|
auth.v1.User user = 1;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IPG - Internet Payment Gateway
|
* IPG - Internet Payment Gateway
|
||||||
* 1. Get Token
|
* 1. Get Token
|
||||||
|
|||||||
@ -24,6 +24,11 @@ service WalletService {
|
|||||||
|
|
||||||
rpc UserGetTransactionList(TransactionListFilter) returns (TransactionList);
|
rpc UserGetTransactionList(TransactionListFilter) returns (TransactionList);
|
||||||
|
|
||||||
|
// Commission Logs
|
||||||
|
rpc GetReferrerCommissionLogsList(auth.v1.InternalIAM) returns (ReferrerCommissionLogsList);
|
||||||
|
rpc GetTotalReferralCommission(TotalReferralCommissionIn) returns (TotalReferralCommissionOut);
|
||||||
|
rpc ClaimReferralCommission(ClaimReferralCommissionIn) returns (base.v1.StatusRes);
|
||||||
|
|
||||||
// Get Token from IPG is and internal api
|
// Get Token from IPG is and internal api
|
||||||
rpc IPGGetToken(IPGGetTokenReq) returns (IPGGetTokenRes);
|
rpc IPGGetToken(IPGGetTokenReq) returns (IPGGetTokenRes);
|
||||||
// IPG Confirm is a public api
|
// IPG Confirm is a public api
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user