@@ -17,6 +17,11 @@ service Wallet {
1717 rpc BuyAIModelReqPackage (BuyAIModelReqPackageRequest ) returns (BuyAIModelReqPackageResponse );
1818 rpc GetAIModelRequestCount (GetAIModelRequestCountRequest ) returns (GetAIModelRequestCountResponse );
1919 rpc GetUsersWalletBalance (GetUsersWalletBalanceRequest ) returns (GetUsersWalletBalanceResponse );
20+ rpc CreateStoragePlan (CreateStoragePlanRequest ) returns (CreateStoragePlanResponse );
21+ rpc GetStoragePlan (GetStoragePlanRequest ) returns (GetStoragePlanResponse );
22+ rpc ListStoragePlans (ListStoragePlansRequest ) returns (ListStoragePlansResponse );
23+ rpc UpdateStoragePlan (UpdateStoragePlanRequest ) returns (UpdateStoragePlanResponse );
24+ rpc DeleteStoragePlan (DeleteStoragePlanRequest ) returns (DeleteStoragePlanResponse );
2025}
2126
2227
@@ -140,3 +145,63 @@ message GetAIModelRequestCountRequest {
140145message GetAIModelRequestCountResponse {
141146 uint64 req_count = 1 ;
142147}
148+
149+ message StoragePlan {
150+ string id = 1 ;
151+ string name = 2 ;
152+ uint64 storage_limit_mb = 3 ; // Storage in MB
153+ uint32 duration_days = 4 ; // Subscription period (e.g., 30 days)
154+ double price = 5 ; // Price in Rials
155+ string description = 6 ; // Optional description
156+ }
157+
158+ message CreateStoragePlanRequest {
159+ string name = 1 ;
160+ uint64 storage_limit_mb = 2 ;
161+ uint32 duration_days = 3 ;
162+ double price = 4 ;
163+ string description = 5 ;
164+ }
165+
166+ message CreateStoragePlanResponse {
167+ StoragePlan plan = 1 ;
168+ }
169+
170+ message GetStoragePlanRequest {
171+ string id = 1 ;
172+ }
173+
174+ message GetStoragePlanResponse {
175+ StoragePlan plan = 1 ;
176+ }
177+
178+ message ListStoragePlansRequest {
179+ int32 page_size = 1 ;
180+ int32 page_number = 2 ;
181+ }
182+
183+ message ListStoragePlansResponse {
184+ repeated StoragePlan plans = 1 ;
185+ int32 total_plans = 2 ;
186+ }
187+
188+ message UpdateStoragePlanRequest {
189+ string id = 1 ;
190+ optional string name = 2 ;
191+ optional uint64 storage_limit_mb = 3 ;
192+ optional uint32 duration_days = 4 ;
193+ optional double price = 5 ;
194+ optional string description = 6 ;
195+ }
196+
197+ message UpdateStoragePlanResponse {
198+ StoragePlan plan = 1 ;
199+ }
200+
201+ message DeleteStoragePlanRequest {
202+ string id = 1 ;
203+ }
204+
205+ message DeleteStoragePlanResponse {
206+ bool success = 1 ;
207+ }
0 commit comments