finish world initialization, set up init on startup and on shutdown, move all models to main directory
This commit is contained in:
28
internal/foundry/models/json/authors.go
Normal file
28
internal/foundry/models/json/authors.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package json
|
||||
|
||||
import "gitea.local.lab/Lbenedar/foundry_helper_service/internal/foundry/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
|
||||
}
|
||||
|
||||
author := &db.Author{
|
||||
Name: a.Name,
|
||||
URL: a.URL,
|
||||
Email: a.Email,
|
||||
Discord: a.Discord,
|
||||
}
|
||||
|
||||
*dest = author
|
||||
|
||||
return true
|
||||
}
|
||||
Reference in New Issue
Block a user