mirror of
				https://github.com/TeaOSLab/EdgeAPI.git
				synced 2025-11-04 16:00:24 +08:00 
			
		
		
		
	
		
			
	
	
		
			33 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
		
		
			
		
	
	
			33 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
| 
								 | 
							
								package models
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								// 服务
							 | 
						||
| 
								 | 
							
								type Server struct {
							 | 
						||
| 
								 | 
							
									Id           uint32 `field:"id"`           // ID
							 | 
						||
| 
								 | 
							
									UserId       uint32 `field:"userId"`       // 用户ID
							 | 
						||
| 
								 | 
							
									AdminId      uint32 `field:"adminId"`      // 管理员ID
							 | 
						||
| 
								 | 
							
									GroupIds     string `field:"groupIds"`     // 分组ID列表
							 | 
						||
| 
								 | 
							
									Config       string `field:"config"`       // 服务配置,自动生成
							 | 
						||
| 
								 | 
							
									IncludeNodes string `field:"includeNodes"` // 部署条件
							 | 
						||
| 
								 | 
							
									ExcludeNodes string `field:"excludeNodes"` // 节点排除条件
							 | 
						||
| 
								 | 
							
									Version      uint32 `field:"version"`      // 版本号
							 | 
						||
| 
								 | 
							
									CreatedAt    uint32 `field:"createdAt"`    // 创建时间
							 | 
						||
| 
								 | 
							
									State        uint8  `field:"state"`        // 状态
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								type ServerOperator struct {
							 | 
						||
| 
								 | 
							
									Id           interface{} // ID
							 | 
						||
| 
								 | 
							
									UserId       interface{} // 用户ID
							 | 
						||
| 
								 | 
							
									AdminId      interface{} // 管理员ID
							 | 
						||
| 
								 | 
							
									GroupIds     interface{} // 分组ID列表
							 | 
						||
| 
								 | 
							
									Config       interface{} // 服务配置,自动生成
							 | 
						||
| 
								 | 
							
									IncludeNodes interface{} // 部署条件
							 | 
						||
| 
								 | 
							
									ExcludeNodes interface{} // 节点排除条件
							 | 
						||
| 
								 | 
							
									Version      interface{} // 版本号
							 | 
						||
| 
								 | 
							
									CreatedAt    interface{} // 创建时间
							 | 
						||
| 
								 | 
							
									State        interface{} // 状态
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								func NewServerOperator() *ServerOperator {
							 | 
						||
| 
								 | 
							
									return &ServerOperator{}
							 | 
						||
| 
								 | 
							
								}
							 |