scanfile/server/internal/database/file.go
2025-05-26 08:33:27 +02:00

19 lines
396 B
Go

package database
import "time"
type File struct {
Id int64
Uuid string //used for file blob storage etc.
Name string //Name of the file
Description string //Any text to add to it for context
MimeType string
CreatedAt time.Time `xorm:"create"`
UpdatedAt time.Time `xorm:"updated"`
}
//Insert File to DB
func (f File) Insert() error {
_, err :=engine.InsertOne(f)
return err
}