+Bilder- u. Download-Manager

This commit is contained in:
Simon Martens
2026-01-27 13:44:46 +01:00
parent 826c08add2
commit 8cf466851a
8 changed files with 275 additions and 34 deletions

View File

@@ -1,6 +1,9 @@
package dbmodels
import "github.com/pocketbase/pocketbase/core"
import (
"github.com/pocketbase/pocketbase/core"
"github.com/pocketbase/pocketbase/tools/types"
)
type Image struct {
core.BaseRecordProxy
@@ -57,3 +60,15 @@ func (i *Image) VorschauPath() string {
func (i *Image) Beschreibung() string {
return i.Description()
}
func (i *Image) Created() types.DateTime {
return i.GetDateTime(CREATED_FIELD)
}
func (i *Image) CreatedUnix() int64 {
t := i.GetDateTime(CREATED_FIELD)
if t.IsZero() {
return 0
}
return t.Time().Unix()
}