mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 13:31:56 +00:00
19 lines
751 B
Go
19 lines
751 B
Go
package entities
|
|
|
|
import "time"
|
|
|
|
type Document struct {
|
|
Id uint `gorm:"primaryKey"`
|
|
DocumentableType string `gorm:"size:50;not null;index:documents_documentable_polymorphic,priority:1"`
|
|
DocumentableId uint64 `gorm:"not null;index:documents_documentable_polymorphic,priority:2"`
|
|
Type string `gorm:"size:50;not null"`
|
|
Path string `gorm:"size:255;not null"`
|
|
Name string `gorm:"size:50;not null"`
|
|
Ext string `gorm:"size:50;not null"`
|
|
Size float64 `gorm:"type:numeric(15,3);not null"`
|
|
CreatedBy *uint `gorm:"index"`
|
|
CreatedAt time.Time `gorm:"autoCreateTime"`
|
|
|
|
CreatedUser *User `gorm:"foreignKey:CreatedBy;references:Id"`
|
|
}
|