feat(api): migrate server and node data handling, update related structures and logic

This commit is contained in:
Chang lue Tsen
2025-08-26 07:05:59 -04:00
parent 9b3cdbbb4f
commit c7884d94aa
52 changed files with 1079 additions and 458 deletions
+16 -6
View File
@@ -384,8 +384,8 @@ type CreateSubscribeRequest struct {
DeviceLimit int64 `json:"device_limit"`
Quota int64 `json:"quota"`
GroupId int64 `json:"group_id"`
ServerGroup []int64 `json:"server_group"`
Server []int64 `json:"server"`
Nodes []int64 `json:"nodes"`
NodeTags []string `json:"node_tags"`
Show *bool `json:"show"`
Sell *bool `json:"sell"`
DeductionRatio int64 `json:"deduction_ratio"`
@@ -1117,6 +1117,10 @@ type GoogleLoginCallbackRequest struct {
State string `form:"state"`
}
type HasMigrateSeverNodeResponse struct {
HasMigrate bool `json:"has_migrate"`
}
type Hysteria2 struct {
Port int `json:"port" validate:"required"`
HopPorts string `json:"hop_ports" validate:"required"`
@@ -1163,6 +1167,12 @@ type MessageLog struct {
CreatedAt int64 `json:"created_at"`
}
type MigrateServerNodeResponse struct {
Succee uint64 `json:"succee"`
Fail uint64 `json:"fail"`
Message string `json:"message,omitempty"`
}
type MobileAuthenticateConfig struct {
Enable bool `json:"enable"`
EnableWhitelist bool `json:"enable_whitelist"`
@@ -1825,8 +1835,8 @@ type Subscribe struct {
DeviceLimit int64 `json:"device_limit"`
Quota int64 `json:"quota"`
GroupId int64 `json:"group_id"`
ServerGroup []int64 `json:"server_group"`
Server []int64 `json:"server"`
Nodes []int64 `json:"nodes"`
NodeTags []string `json:"node_tags"`
Show bool `json:"show"`
Sell bool `json:"sell"`
Sort int64 `json:"sort"`
@@ -2195,8 +2205,8 @@ type UpdateSubscribeRequest struct {
DeviceLimit int64 `json:"device_limit"`
Quota int64 `json:"quota"`
GroupId int64 `json:"group_id"`
ServerGroup []int64 `json:"server_group"`
Server []int64 `json:"server"`
Nodes []int64 `json:"nodes"`
NodeTags []string `json:"node_tags"`
Show *bool `json:"show"`
Sell *bool `json:"sell"`
Sort int64 `json:"sort"`