mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-12-19 19:57:09 +08:00
1.迁移表时添加字段注释
2.修复游客状态评论接口报空指针的问题
This commit is contained in:
@@ -17,18 +17,18 @@ import (
|
||||
// Attachment struct .
|
||||
type Attachment struct {
|
||||
AttachmentId int `orm:"column(attachment_id);pk;auto;unique" json:"attachment_id"`
|
||||
BookId int `orm:"column(book_id);type(int)" json:"book_id"`
|
||||
DocumentId int `orm:"column(document_id);type(int);null" json:"doc_id"`
|
||||
FileName string `orm:"column(file_name);size(255)" json:"file_name"`
|
||||
FilePath string `orm:"column(file_path);size(2000)" json:"file_path"`
|
||||
FileSize float64 `orm:"column(file_size);type(float)" json:"file_size"`
|
||||
HttpPath string `orm:"column(http_path);size(2000)" json:"http_path"`
|
||||
FileExt string `orm:"column(file_ext);size(50)" json:"file_ext"`
|
||||
CreateTime time.Time `orm:"type(datetime);column(create_time);auto_now_add" json:"create_time"`
|
||||
CreateAt int `orm:"column(create_at);type(int)" json:"create_at"`
|
||||
BookId int `orm:"column(book_id);type(int);description(所属book id)" json:"book_id"`
|
||||
DocumentId int `orm:"column(document_id);type(int);null;description(所属文档id)" json:"doc_id"`
|
||||
FileName string `orm:"column(file_name);size(255);description(文件名称)" json:"file_name"`
|
||||
FilePath string `orm:"column(file_path);size(2000);description(文件路径)" json:"file_path"`
|
||||
FileSize float64 `orm:"column(file_size);type(float);description(文件大小 字节)" json:"file_size"`
|
||||
HttpPath string `orm:"column(http_path);size(2000);description(文件路径)" json:"http_path"`
|
||||
FileExt string `orm:"column(file_ext);size(50);description(文件后缀)" json:"file_ext"`
|
||||
CreateTime time.Time `orm:"type(datetime);column(create_time);auto_now_add;description(创建时间)" json:"create_time"`
|
||||
CreateAt int `orm:"column(create_at);type(int);description(创建人id)" json:"create_at"`
|
||||
}
|
||||
|
||||
// TableName 获取对应数据库表名.
|
||||
// TableName 获取对应上传附件数据库表名.
|
||||
func (m *Attachment) TableName() string {
|
||||
return "attachment"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user