mirror of
https://github.com/Theodor-Springmann-Stiftung/musenalm.git
synced 2026-02-04 10:35:30 +00:00
+Bilder- u. Download-Manager
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user