- jz_bm_material_file_texts caches the pdftotext output per file - the River job jz.bm.extract_material_text extracts and resyncs - the management multipart attach queues it inside its transaction - file_texts in the document and a file snippet with its name
19 lines
741 B
Go
19 lines
741 B
Go
package models
|
|
|
|
import "time"
|
|
|
|
// MaterialFileText is the text extracted from one PDF attached to a
|
|
// material. An empty Text means the file was extracted and held none (a
|
|
// scan or a broken PDF). Truncated is set when the text was cut at the
|
|
// extraction cap. The row goes with its file (foreign-key cascade).
|
|
type MaterialFileText struct {
|
|
FileID uint `gorm:"column:file_id;primaryKey;autoIncrement:false"`
|
|
MaterialID uint `gorm:"column:material_id"`
|
|
Text string `gorm:"column:text"`
|
|
Truncated bool `gorm:"column:truncated"`
|
|
ExtractedAt time.Time `gorm:"column:extracted_at"`
|
|
}
|
|
|
|
// TableName is the file text table.
|
|
func (MaterialFileText) TableName() string { return "jz_bm_material_file_texts" }
|