Attachment struct .
| 14 | |
| 15 | // Attachment struct . |
| 16 | type 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 获取对应数据库表名. |
| 30 | func (m *Attachment) TableName() string { |
nothing calls this directly
no outgoing calls
no test coverage detected