refactor(documents): split document models
This commit is contained in:
15
backend/internal/models/document_content.go
Normal file
15
backend/internal/models/document_content.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
type SaDocumentContent struct {
|
||||
ID uint `gorm:"primaryKey"`
|
||||
DocumentID uint `gorm:"uniqueIndex;not null"`
|
||||
Markdown string `gorm:"type:text"`
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
}
|
||||
|
||||
func (SaDocumentContent) TableName() string {
|
||||
return "sa_document_contents"
|
||||
}
|
||||
Reference in New Issue
Block a user