Documentation ¶
Index ¶
- func AddDoc(code, title, label, principal string, end time.Time, uid int64) (id int64, err error)
- func AddOnlyAttachment(filename string, filesize, downloads, productid int64) (id int64, err1, err2 error)
- func AddOnlyChanges(key, uid, uname, created string) (id int64, err1, err2 error)
- func AddOnlyHistory(onlyattachmentid, uid int64, serverversion string, version int, ...) (id int64, err1, err2 error)
- func DeleteDoc(cid int64) error
- func DeleteOnlyAttachment(cid int64) error
- func UpdateDoc(cid int64, code, title, label, principal string, end time.Time) error
- func UpdateDocTime(cid int64) error
- func UpdateOnlyAttachment(cid int64) (err error)
- type OnlyAttachment
- type OnlyChanges
- type OnlyHistory
- type OnlyOffice
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddOnlyAttachment ¶
func AddOnlyAttachment(filename string, filesize, downloads, productid int64) (id int64, err1, err2 error)
添加附件到成果id下 如果附件名称已经存在,则不再追加写入数据库 应该用ReadOrCreate尝试从数据库读取,不存在的话就创建一个
func AddOnlyChanges ¶
添加历史版本
func AddOnlyHistory ¶
func AddOnlyHistory(onlyattachmentid, uid int64, serverversion string, version int, key, fileurl, changesurl string, expires, created time.Time) (id int64, err1, err2 error)
添加历史版本
func UpdateOnlyAttachment ¶
修改附件的日期和changesurl修改记录地址
Types ¶
type OnlyAttachment ¶
type OnlyAttachment struct { Id int64 FileName string FileSize int64 Downloads int64 DocId int64 //*Topic `orm:"rel(fk)"` // Changesurl string `orm:"null"` //文件修改记录 Created time.Time `orm:"auto_now_add;type(datetime)"` Updated time.Time `orm:"auto_now;type(datetime)"` }
附件
func GetOnlyAttachbyId ¶
func GetOnlyAttachbyId(Id int64) (attach OnlyAttachment, err error)
根据附件id查询附件
func GetOnlyAttachments ¶
func GetOnlyAttachments(id int64) (attachments []*OnlyAttachment, err error)
根据成果id取得所有附件
type OnlyChanges ¶
type OnlyChanges struct { Id int64 HistoryKey string `orm:"sie(19)"` UserId string `orm:"sie(10)"` UserName string `orm:"sie(20)"` Created string `orm:"sie(19)"` }
修改情况
func GetOnlyChanges ¶
func GetOnlyChanges(key string) (onlychanges []*OnlyChanges, err error)
根据附件历史版本key获取历史版本修改信息
type OnlyHistory ¶
type OnlyHistory struct { Id int64 AttachId int64 UserId int64 ServerVersion string Version int FileUrl string ChangesUrl string //`orm:"null"` HistoryKey string `orm:"sie(19)"` Expires time.Time `orm:"type(datetime)"` Created time.Time `orm:"type(datetime)"` }
历史版本
func GetOnlyHistory ¶
func GetOnlyHistory(onlyattachmentid int64) (onlyhistories []*OnlyHistory, err error)
根据附件id获取历史版本信息
func GetOnlyHistoryVersion ¶
func GetOnlyHistoryVersion(onlyattachmentid int64) (onlyhistories []OnlyHistory, err error)
获取附件id历史版本号
type OnlyOffice ¶
type OnlyOffice struct { Id int64 `form:"-"` Code string `orm:"null"` Title string `orm:"null"` Label string `orm:"null"` End time.Time `orm:"null;type(datetime)"` Principal string `orm:"null"` // Ext string `orm:"null"` Uid int64 `orm:"null"` Created time.Time `orm:"auto_now_add;type(datetime)"` Updated time.Time `orm:"auto_now;type(datetime)"` }
Click to show internal directories.
Click to hide internal directories.