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/stats.go
Normal file
28
internal/foundry/temp_models/json/stats.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package json
|
||||
|
||||
import "gitea.local.lab/Lbenedar/foundry_helper_service/internal/foundry/temp_models/db"
|
||||
|
||||
type Stats struct {
|
||||
CoreVersion string `json:"coreVersion"`
|
||||
SystemID string `json:"systemId"`
|
||||
SystemVersion string `json:"systemVersion"`
|
||||
LastModifiedBy string `json:"lastModifiedBy"`
|
||||
ModifiedTime int64 `json:"modifiedTime"`
|
||||
// CompendiumSource string `json:"compendiumSource,omitempty"`
|
||||
// DuplicateSource string `json:"duplicateSource,omitempty"`
|
||||
// ExportSource string `json:"exportSource,omitempty"`
|
||||
}
|
||||
|
||||
func (s *Stats) ToDB(dest *db.Stats) bool {
|
||||
if dest == nil {
|
||||
return false
|
||||
}
|
||||
|
||||
dest.CoreVersion = s.CoreVersion
|
||||
dest.SystemID = s.SystemID
|
||||
dest.SystemVersion = s.SystemVersion
|
||||
dest.LastModifiedBy = s.LastModifiedBy
|
||||
dest.ModifiedTime = s.ModifiedTime
|
||||
|
||||
return true
|
||||
}
|
||||
Reference in New Issue
Block a user