add new models, change migration files, prepare to add all new tables from models
This commit is contained in:
24
internal/foundry/temp_models/json/authors.go
Normal file
24
internal/foundry/temp_models/json/authors.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package json
|
||||
|
||||
import "gitea.local.lab/Lbenedar/foundry_helper_service/internal/foundry/temp_models/db"
|
||||
|
||||
type Author struct {
|
||||
Name string `json:"name"`
|
||||
URL string `json:"url"`
|
||||
Email string `json:"email,omitempty"`
|
||||
Discord string `json:"discord,omitempty"`
|
||||
// SystemAuthorsFlags SystemAuthorsFlags `json:"flags"`
|
||||
}
|
||||
|
||||
func (a *Author) ToDB(dest *db.Author) bool {
|
||||
if dest == nil {
|
||||
return false
|
||||
}
|
||||
|
||||
dest.Name = a.Name
|
||||
dest.URL = a.URL
|
||||
dest.Email = a.Email
|
||||
dest.Discord = a.Discord
|
||||
|
||||
return true
|
||||
}
|
||||
Reference in New Issue
Block a user