finish world initialization, set up init on startup and on shutdown, move all models to main directory
This commit is contained in:
@@ -1,11 +1,32 @@
|
||||
package json
|
||||
|
||||
import "gitea.local.lab/Lbenedar/foundry_helper_service/internal/foundry/models/db"
|
||||
|
||||
type Release struct {
|
||||
Generation int `json:"generation"`
|
||||
Channel string `json:"channel"`
|
||||
Suffix string `json:"suffix"`
|
||||
Build int `json:"build"`
|
||||
Node_version int `json:"node_version"`
|
||||
Time int64 `json:"time"`
|
||||
flags struct{} `json:"-"`
|
||||
Generation int `json:"generation"`
|
||||
Channel string `json:"channel"`
|
||||
Suffix string `json:"suffix"`
|
||||
Build int `json:"build"`
|
||||
NodeVersion int `json:"node_version"`
|
||||
MaxGeneration int `json:"maxGeneration"`
|
||||
MaxStableGeneration int `json:"maxStableGeneration"`
|
||||
Time int64 `json:"time"`
|
||||
// Flags Flags `json:"flags"`
|
||||
}
|
||||
|
||||
func (r *Release) ToDB(dest *db.Release) bool {
|
||||
if dest == nil {
|
||||
return false
|
||||
}
|
||||
|
||||
dest.Generation = r.Generation
|
||||
dest.Channel = r.Channel
|
||||
dest.Suffix = r.Suffix
|
||||
dest.Build = r.Build
|
||||
dest.NodeVersion = r.NodeVersion
|
||||
dest.MaxGeneration = r.MaxGeneration
|
||||
dest.MaxStableGeneration = r.MaxStableGeneration
|
||||
dest.Time = r.Time
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user