22 lines
380 B
Go
22 lines
380 B
Go
package json
|
|
|
|
import "gitea.local.lab/Lbenedar/foundry_helper_service/internal/foundry/temp_models/db"
|
|
|
|
type Media struct {
|
|
Type string `json:"type"`
|
|
URL string `json:"url"`
|
|
Caption string `json:"caption"`
|
|
}
|
|
|
|
func (m *Media) ToDB(dest *db.Media) bool {
|
|
if dest == nil {
|
|
return false
|
|
}
|
|
|
|
dest.Type = m.Type
|
|
dest.URL = m.URL
|
|
dest.Caption = m.Caption
|
|
|
|
return true
|
|
}
|