// @Author gmy 2024/9/19 15:13:00 package document_manage_model import ( "github.com/beego/beego/v2/client/orm" ) type OutsideReportAttachment struct { OutsideReportAttachmentId int `orm:"column(outside_report_attachment_id);pk" description:"外部报告附件ID"` OutsideReportId int `orm:"column(outside_report_id)" description:"报告id"` Title string `orm:"column(title)" description:"附件名称"` Url string `orm:"column(url)" description:"附件地址"` CreateTime string `orm:"column(create_time)" description:"附件新增时间"` FileSize int64 `orm:"column(file_size)" description:"附件大小"` } // 在 init 函数中注册模型 func init() { orm.RegisterModel(new(OutsideReportAttachment)) } // SaveOutsideReportAttachment 保存附件 func SaveOutsideReportAttachment(attachment *OutsideReportAttachment) (int64, error) { o := orm.NewOrmUsingDB("rddp") return o.Insert(attachment) }