mirror of
				https://github.com/TeaOSLab/EdgeCommon.git
				synced 2025-11-04 05:00:24 +08:00 
			
		
		
		
	
		
			
	
	
		
			45 lines
		
	
	
		
			949 B
		
	
	
	
		
			Protocol Buffer
		
	
	
	
	
	
		
		
			
		
	
	
			45 lines
		
	
	
		
			949 B
		
	
	
	
		
			Protocol Buffer
		
	
	
	
	
	
| 
								 | 
							
								syntax = "proto3";
							 | 
						||
| 
								 | 
							
								option go_package = "./pb";
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								package pb;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								// 用户账户统计服务
							 | 
						||
| 
								 | 
							
								service UserAccountDailyStatService {
							 | 
						||
| 
								 | 
							
									// 列出按天统计
							 | 
						||
| 
								 | 
							
									rpc listUserAccountDailyStats(ListUserAccountDailyStatsRequest) returns (ListUserAccountDailyStatsResponse);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
									// 列出按月统计
							 | 
						||
| 
								 | 
							
									rpc listUserAccountMonthlyStats(ListUserAccountMonthlyStatsRequest) returns (ListUserAccountMonthlyStatsResponse);
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								// 列出按天统计
							 | 
						||
| 
								 | 
							
								message ListUserAccountDailyStatsRequest {
							 | 
						||
| 
								 | 
							
									string dayFrom = 1;
							 | 
						||
| 
								 | 
							
									string dayTo = 2;
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								message ListUserAccountDailyStatsResponse {
							 | 
						||
| 
								 | 
							
									repeated Stat stats = 1;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
									message Stat {
							 | 
						||
| 
								 | 
							
										string day = 1; // YYYYMMDD
							 | 
						||
| 
								 | 
							
										float income = 2;
							 | 
						||
| 
								 | 
							
										float expense = 3;
							 | 
						||
| 
								 | 
							
									}
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								// 列出按月统计
							 | 
						||
| 
								 | 
							
								message ListUserAccountMonthlyStatsRequest {
							 | 
						||
| 
								 | 
							
									string dayFrom = 1;
							 | 
						||
| 
								 | 
							
									string dayTo = 2;
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								message ListUserAccountMonthlyStatsResponse {
							 | 
						||
| 
								 | 
							
									repeated Stat stats = 1;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
									message Stat {
							 | 
						||
| 
								 | 
							
										string month = 1; // YYYYMM
							 | 
						||
| 
								 | 
							
										float income = 2;
							 | 
						||
| 
								 | 
							
										float expense = 3;
							 | 
						||
| 
								 | 
							
									}
							 | 
						||
| 
								 | 
							
								}
							 |