- Implemented player_configs table to store multiple player configurations per user. - Migrated existing player settings from user_preferences to player_configs. - Removed player-related columns from user_preferences. - Added referral state fields to user for tracking referral rewards. - Created migration scripts for database changes and data migration. - Added test cases for app services and usage helpers. - Introduced video job service interfaces and implementations.
64 lines
1.4 KiB
Protocol Buffer
64 lines
1.4 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package stream.app.v1;
|
|
|
|
option go_package = "stream.api/internal/gen/proto/app/v1;appv1";
|
|
|
|
import "app/v1/common.proto";
|
|
|
|
service PaymentsService {
|
|
rpc CreatePayment(CreatePaymentRequest) returns (CreatePaymentResponse);
|
|
rpc ListPaymentHistory(ListPaymentHistoryRequest) returns (ListPaymentHistoryResponse);
|
|
rpc TopupWallet(TopupWalletRequest) returns (TopupWalletResponse);
|
|
rpc DownloadInvoice(DownloadInvoiceRequest) returns (DownloadInvoiceResponse);
|
|
}
|
|
|
|
message CreatePaymentRequest {
|
|
string plan_id = 1;
|
|
int32 term_months = 2;
|
|
string payment_method = 3;
|
|
optional double topup_amount = 4;
|
|
}
|
|
|
|
message CreatePaymentResponse {
|
|
Payment payment = 1;
|
|
PlanSubscription subscription = 2;
|
|
double wallet_balance = 3;
|
|
string invoice_id = 4;
|
|
string message = 5;
|
|
}
|
|
|
|
message ListPaymentHistoryRequest {
|
|
int32 page = 1;
|
|
int32 limit = 2;
|
|
}
|
|
|
|
message ListPaymentHistoryResponse {
|
|
repeated PaymentHistoryItem payments = 1;
|
|
int64 total = 2;
|
|
int32 page = 3;
|
|
int32 limit = 4;
|
|
bool has_prev = 5;
|
|
bool has_next = 6;
|
|
}
|
|
|
|
message TopupWalletRequest {
|
|
double amount = 1;
|
|
}
|
|
|
|
message TopupWalletResponse {
|
|
WalletTransaction wallet_transaction = 1;
|
|
double wallet_balance = 2;
|
|
string invoice_id = 3;
|
|
}
|
|
|
|
message DownloadInvoiceRequest {
|
|
string id = 1;
|
|
}
|
|
|
|
message DownloadInvoiceResponse {
|
|
string filename = 1;
|
|
string content_type = 2;
|
|
string content = 3;
|
|
}
|