23 lines
447 B
Go
23 lines
447 B
Go
package models
|
|
|
|
import (
|
|
"time"
|
|
|
|
"gorm.io/gorm"
|
|
)
|
|
|
|
type Image struct {
|
|
gorm.Model
|
|
ID uint32 `gorm:"primary_key;auto_increment;not_null"`
|
|
Path string
|
|
Filename string
|
|
Size int64
|
|
ContentType string
|
|
Width int
|
|
Height int
|
|
SHA256 string `gorm:"column:sha256;index;size:64"`
|
|
UploadedByID uint32
|
|
CreatedAt time.Time `gorm:"autoCreateTime"`
|
|
UpdatedAt time.Time `gorm:"autoUpdateTime"`
|
|
}
|