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" }