add db models, refactor json models, add references in migrations

This commit is contained in:
lbenedar
2026-04-06 16:40:49 +03:00
parent a16edb9b61
commit 095dac5db7
28 changed files with 709 additions and 259 deletions

View File

@@ -5,7 +5,7 @@ import (
"fmt"
"net/http"
"gitea.local.lab/Lbenedar/foundry_helper_service/internal/foundry/models"
json_model "gitea.local.lab/Lbenedar/foundry_helper_service/internal/foundry/models/json"
)
func (conf *Config) GetSessionId() error {
@@ -42,7 +42,7 @@ func (conf *Config) GetSessionToken() (bool, error) {
return conf.SetSessionTokenFromHeader(resp.Header)
}
func (conf *Config) GetStatus() (*models.Status, error) {
func (conf *Config) GetStatus() (*json_model.Status, error) {
getResp, err := http.Get(fmt.Sprintf("http://%s/api/status", conf.Host))
if err != nil {
return nil, err
@@ -55,7 +55,7 @@ func (conf *Config) GetStatus() (*models.Status, error) {
return nil, err
}
var status models.Status
var status json_model.Status
err = json.Unmarshal(statusByte, &status)
if err != nil {
return nil, err