models

package
v0.0.0-...-78fc42a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddOnlyAttachment

func AddOnlyAttachment(originName, fileName string) (id int64, err error)

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

func UpdateFileUrlAndUpdateTime(attachId int64, fileName string) (int64, error)

UpdateFileUrlAndUpdateTime 更新文件地址和更新时间

func UpdateOnlyAttachmentTime

func UpdateOnlyAttachmentTime(cid int64) (err error)

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 应用信息

func GetAppById

func GetAppById(appId string) (App, error)

GetAppById 根据appid查询相关服务

func (*App) TableName

func (flow *App) TableName() string

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获取最后一次历史版本

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL