2020-12-10 22:07:21 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								package models
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2021-06-08 11:18:27 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								// ServerDailyStat 计费流量统计
							 | 
						
					
						
							
								
									
										
										
										
											2020-12-11 17:28:20 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								type ServerDailyStat struct {
							 | 
						
					
						
							
								
									
										
										
										
											2021-11-11 08:30:53 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									Id                  uint64  `field:"id"`                  // ID
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									UserId              uint32  `field:"userId"`              // 用户ID
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									ServerId            uint32  `field:"serverId"`            // 服务ID
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RegionId            uint32  `field:"regionId"`            // 区域ID
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Bytes               uint64  `field:"bytes"`               // 流量
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									CachedBytes         uint64  `field:"cachedBytes"`         // 缓存的流量
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									CountRequests       uint64  `field:"countRequests"`       // 请求数
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									CountCachedRequests uint64  `field:"countCachedRequests"` // 缓存的请求数
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									CountAttackRequests uint64  `field:"countAttackRequests"` // 攻击请求数
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									AttackBytes         uint64  `field:"attackBytes"`         // 攻击流量
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Day                 string  `field:"day"`                 // 日期YYYYMMDD
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Hour                string  `field:"hour"`                // YYYYMMDDHH
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									TimeFrom            string  `field:"timeFrom"`            // 开始时间HHMMSS
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									TimeTo              string  `field:"timeTo"`              // 结束时间
							 | 
						
					
						
							
								
									
										
										
										
											2022-03-22 22:11:32 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									IsCharged           bool    `field:"isCharged"`           // 是否已计算费用
							 | 
						
					
						
							
								
									
										
										
										
											2021-11-11 08:30:53 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									PlanId              uint64  `field:"planId"`              // 套餐ID
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Fee                 float64 `field:"fee"`                 // 费用
							 | 
						
					
						
							
								
									
										
										
										
											2020-12-10 22:07:21 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2020-12-11 17:28:20 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								type ServerDailyStatOperator struct {
							 | 
						
					
						
							
								
									
										
										
										
											2021-06-08 11:18:27 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									Id                  interface{} // ID
							 | 
						
					
						
							
								
									
										
										
										
											2021-07-11 18:05:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									UserId              interface{} // 用户ID
							 | 
						
					
						
							
								
									
										
										
										
											2021-06-08 11:18:27 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									ServerId            interface{} // 服务ID
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RegionId            interface{} // 区域ID
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Bytes               interface{} // 流量
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									CachedBytes         interface{} // 缓存的流量
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									CountRequests       interface{} // 请求数
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									CountCachedRequests interface{} // 缓存的请求数
							 | 
						
					
						
							
								
									
										
										
										
											2021-07-13 11:04:45 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									CountAttackRequests interface{} // 攻击请求数
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									AttackBytes         interface{} // 攻击流量
							 | 
						
					
						
							
								
									
										
										
										
											2021-06-08 11:18:27 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									Day                 interface{} // 日期YYYYMMDD
							 | 
						
					
						
							
								
									
										
										
										
											2021-07-05 11:37:22 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									Hour                interface{} // YYYYMMDDHH
							 | 
						
					
						
							
								
									
										
										
										
											2021-06-08 11:18:27 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									TimeFrom            interface{} // 开始时间HHMMSS
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									TimeTo              interface{} // 结束时间
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									IsCharged           interface{} // 是否已计算费用
							 | 
						
					
						
							
								
									
										
										
										
											2021-11-11 08:30:53 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									PlanId              interface{} // 套餐ID
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Fee                 interface{} // 费用
							 | 
						
					
						
							
								
									
										
										
										
											2020-12-10 22:07:21 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2020-12-11 17:28:20 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								func NewServerDailyStatOperator() *ServerDailyStatOperator {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									return &ServerDailyStatOperator{}
							 | 
						
					
						
							
								
									
										
										
										
											2020-12-10 22:07:21 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 |