add new models, change migration files, prepare to add all new tables from models
This commit is contained in:
28
internal/foundry/temp_models/json/package_warnings.go
Normal file
28
internal/foundry/temp_models/json/package_warnings.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package json
|
||||
|
||||
import "gitea.local.lab/Lbenedar/foundry_helper_service/internal/foundry/temp_models/db"
|
||||
|
||||
type PackageWarningsData struct {
|
||||
Id string `json:"id"`
|
||||
Type string `json:"type"`
|
||||
Warning []string `json:"warning"`
|
||||
Error []string `json:"error"`
|
||||
Reinstallable bool `json:"reinstallable"`
|
||||
Manifest string `json:"manifest,omitempty"`
|
||||
}
|
||||
|
||||
func (p *PackageWarningsData) ToDB(dest *db.PackageWarningsData) bool {
|
||||
if dest == nil {
|
||||
return false
|
||||
}
|
||||
|
||||
dest.ID = p.Id
|
||||
dest.Type = p.Type
|
||||
dest.Reinstallable = p.Reinstallable
|
||||
dest.Manifest = p.Manifest
|
||||
|
||||
copy(dest.Warning, p.Warning)
|
||||
copy(dest.Error, p.Error)
|
||||
|
||||
return true
|
||||
}
|
||||
Reference in New Issue
Block a user