nquest/pkg/models/file.go
2024-01-28 19:19:41 +00:00

19 lines
388 B
Go

package models
import (
"time"
"github.com/google/uuid"
"gorm.io/gorm"
)
type File struct {
ID uuid.UUID `gorm:"primarykey" json:"id"`
Filename string
ContentType string
Size int
Body []byte `gorm:"type:bytea"`
CreatedAt time.Time `json:"-"`
UpdatedAt time.Time `json:"-"`
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
}