add new models, change migration files, prepare to add all new tables from models
This commit is contained in:
25
internal/foundry/temp_models/json/index.go
Normal file
25
internal/foundry/temp_models/json/index.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package json
|
||||
|
||||
import "gitea.local.lab/Lbenedar/foundry_helper_service/internal/foundry/temp_models/db"
|
||||
|
||||
type Index struct {
|
||||
Id string `json:"_id"`
|
||||
Folder string `json:"folder"`
|
||||
Img string `json:"img"`
|
||||
Name string `json:"name"`
|
||||
Type string `json:"type"`
|
||||
}
|
||||
|
||||
func (i *Index) ToDB(dest *db.Index) bool {
|
||||
if dest == nil {
|
||||
return false
|
||||
}
|
||||
|
||||
dest.ID = i.Id
|
||||
dest.Folder = i.Folder
|
||||
dest.Img = i.Img
|
||||
dest.Name = i.Name
|
||||
dest.Type = i.Type
|
||||
|
||||
return true
|
||||
}
|
||||
Reference in New Issue
Block a user