Files
crawlab/core/models/models/node.go
Marvin Zhang ddff881954 chore: update Go version and dependencies
- Updated Go version in go.work and backend/go.mod to 1.23.7
- Updated various dependencies in go.sum and backend/go.sum
- Refactored models to remove generic type parameters from BaseModel
- Introduced new utility functions for consistent API responses
- Removed unused utility files from controllers
2025-03-12 23:20:06 +08:00

24 lines
887 B
Go

package models
import (
"time"
)
type Node struct {
any `collection:"nodes"`
BaseModel `bson:",inline"`
Key string `json:"key" bson:"key"`
Name string `json:"name" bson:"name"`
Ip string `json:"ip" bson:"ip"`
Mac string `json:"mac" bson:"mac"`
Hostname string `json:"hostname" bson:"hostname"`
Description string `json:"description" bson:"description"`
IsMaster bool `json:"is_master" bson:"is_master"`
Status string `json:"status" bson:"status"`
Enabled bool `json:"enabled" bson:"enabled"`
Active bool `json:"active" bson:"active"`
ActiveAt time.Time `json:"active_at" bson:"active_ts"`
CurrentRunners int `json:"current_runners" bson:"current_runners"`
MaxRunners int `json:"max_runners" bson:"max_runners"`
}