Documentation
¶
Index ¶
- func AddOnlyAttachment(originName, fileName string) (id int64, err error)
- func AddOnlyHistory(docId int64, serverVersion string, key, fileUrl, changesUrl string, ...) (id int64, err error)
- func UpdateFileUrlAndUpdateTime(attachId int64, fileName string) (int64, error)
- func UpdateOnlyAttachmentTime(cid int64) (err error)
- type App
- type OnlyAttachment
- type OnlyHistory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddOnlyAttachment ¶
AddOnlyAttachment 添加附件到成果id下 如果附件名称已经存在,则不再追加写入数据库 应该用ReadOrCreate尝试从数据库读取,不存在的话就创建一个
func AddOnlyHistory ¶
func AddOnlyHistory(docId int64, serverVersion string, key, fileUrl, changesUrl string, expires, created time.Time) (id int64, err error)
AddOnlyHistory 添加历史版本
func UpdateFileUrlAndUpdateTime ¶
UpdateFileUrlAndUpdateTime 更新文件地址和更新时间
func UpdateOnlyAttachmentTime ¶
UpdateOnlyAttachmentTime 修改附件的日期和changesurl修改记录地址
Types ¶
type App ¶
type App struct { Id int64 AppId string `orm:"unique;description(应用名称)"` CheckUrl string `orm:"description(核查url)"` Status int `orm:"default:0;description(状态删除 0有效 1无效)"` UpdateAt time.Time `orm:"auto_now;type(datetime); description(修改时间)"` CreateAt time.Time `orm:"auto_now_add;type(datetime);description(创建时间)"` }
App 应用信息
type OnlyAttachment ¶
type OnlyAttachment struct { Id int64 FileName string `orm:"description(文件名称)"` OriginName string `orm:"description(文件原始名称)"` Created time.Time `orm:"auto_now_add;type(datetime);description(创建时间)"` Updated time.Time `orm:"auto_now;type(datetime);description(修改时间)"` }
OnlyAttachment 附件
func GetOnlyAttachmentById ¶
func GetOnlyAttachmentById(Id int64) (attach OnlyAttachment, err error)
GetOnlyAttachmentById 根据附件id查询附件
type OnlyHistory ¶
type OnlyHistory struct { Id int64 AttachId int64 `orm:"description(关联附件id)"` ServerVersion string `orm:"description(文档服务器服务版本)"` FileUrl string `orm:"description(文件下载连接)"` ChangesUrl string `orm:"description(文件变化下载连接)"` HistoryKey string `orm:"sie(19);description(文档服务器key)"` Expires time.Time `orm:"type(datetime);description(过期时间)"` Created time.Time `orm:"type(datetime);description(创建时间)"` }
OnlyHistory 历史版本
func GetLastHistoryByAttachId ¶
func GetLastHistoryByAttachId(attachId int64) (history OnlyHistory, err error)
GetLastHistoryByAttachId 根据附件id获取最后一次历史版本
Click to show internal directories.
Click to hide internal directories.