refactor(documents): split document models
This commit is contained in:
18
backend/internal/models/document_blob.go
Normal file
18
backend/internal/models/document_blob.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
type SaDocumentBlob struct {
|
||||
ID uint `gorm:"primaryKey"`
|
||||
DocumentID uint `gorm:"uniqueIndex;not null"`
|
||||
StorageKey string `gorm:"size:64;uniqueIndex;not null"`
|
||||
RelativePath string `gorm:"not null"`
|
||||
OriginalName string `gorm:"not null"`
|
||||
Checksum string `gorm:"size:64;not null"`
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
}
|
||||
|
||||
func (SaDocumentBlob) TableName() string {
|
||||
return "sa_document_blobs"
|
||||
}
|
||||
Reference in New Issue
Block a user