14 lines
413 B
Go
14 lines
413 B
Go
package models
|
|
|
|
import "time"
|
|
|
|
type File struct {
|
|
ID uint32 `gorm:"primary_key" json:"id"`
|
|
Name string `gorm:"not null" json:"name"`
|
|
Checksum string `gorm:"unique;size:44;not null"`
|
|
Author *Account `gorm:"constraint:OnDelete:SET NULL,OnUpdate:CASCADE" json:"author"`
|
|
AuthorId *uint32 `json:"-"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|