-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmodels.go
More file actions
38 lines (33 loc) · 935 Bytes
/
models.go
File metadata and controls
38 lines (33 loc) · 935 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package main
// Device 设备结构体
type Device struct {
ID int `json:"id"`
Name string `json:"name"`
MAC string `json:"mac"`
Broadcast string `json:"broadcast"`
Port int `json:"port"`
Description string `json:"description"`
CreatedAt string `json:"created_at"`
}
// WOLRequest WOL请求结构体
type WOLRequest struct {
MAC string `json:"mac"`
Broadcast string `json:"broadcast,omitempty"`
Port int `json:"port,omitempty"`
}
// WOLResponse WOL响应结构体
type WOLResponse struct {
Success bool `json:"success"`
Message string `json:"message"`
MAC string `json:"mac"`
}
// LoginRequest 登录请求结构体
type LoginRequest struct {
Password string `json:"password"`
}
// LoginResponse 登录响应结构体
type LoginResponse struct {
Success bool `json:"success"`
Message string `json:"message"`
Token string `json:"token,omitempty"`
}