You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cloudreve/models/report.go

22 lines
412 B

package model
import (
"github.com/jinzhu/gorm"
)
// Report 举报模型
type Report struct {
gorm.Model
ShareID uint `gorm:"index:share_id"` // 对应分享ID
Reason int // 举报原因
Description string // 补充描述
// 关联模型
Share Share `gorm:"save_associations:false:false"`
}
// Create 创建举报
func (report *Report) Create() error {
return DB.Create(report).Error
}