nquest/pkg/models/file.go

20 lines
388 B
Go
Raw Normal View History

2024-01-20 21:37:49 +03:00
package models
2024-01-28 22:19:41 +03:00
import (
"time"
"github.com/google/uuid"
"gorm.io/gorm"
)
2024-01-20 21:37:49 +03:00
2024-01-28 22:19:41 +03:00
type File struct {
ID uuid.UUID `gorm:"primarykey" json:"id"`
2024-01-20 21:37:49 +03:00
Filename string
ContentType string
Size int
2024-01-28 22:19:41 +03:00
Body []byte `gorm:"type:bytea"`
CreatedAt time.Time `json:"-"`
UpdatedAt time.Time `json:"-"`
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
2024-01-20 21:37:49 +03:00
}