MCPcopy Create free account
hub / github.com/TruthHun/BookStack / Attachment

Struct Attachment

models/attachment.go:16–27  ·  view source on GitHub ↗

Attachment struct .

Source from the content-addressed store, hash-verified

14
15// Attachment struct .
16type Attachment struct {
17 AttachmentId int `orm:"column(attachment_id);pk;auto;unique" json:"attachment_id"`
18 BookId int `orm:"column(book_id);type(int)" json:"book_id"`
19 DocumentId int `orm:"column(document_id);type(int);null" json:"doc_id"`
20 FileName string `orm:"column(file_name);size(255)" json:"file_name"`
21 FilePath string `orm:"column(file_path);size(2000)" json:"file_path"`
22 FileSize float64 `orm:"column(file_size);type(float)" json:"file_size"`
23 HttpPath string `orm:"column(http_path);size(2000)" json:"http_path"`
24 FileExt string `orm:"column(file_ext);size(50)" json:"file_ext"`
25 CreateTime time.Time `orm:"type(datetime);column(create_time);auto_now_add" json:"create_time"`
26 CreateAt int `orm:"column(create_at);type(int)" json:"create_at"`
27}
28
29// TableName 获取对应数据库表名.
30func (m *Attachment) TableName() string {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected