提交
This commit is contained in:
@@ -5,6 +5,7 @@ import "time"
|
||||
// File 文件模型
|
||||
type File struct {
|
||||
ID uint64 `json:"id" gorm:"primaryKey"`
|
||||
BizID string `json:"biz_id" gorm:"index;size:128"` // 业务ID
|
||||
Name string `json:"name" gorm:"size:256;not null"`
|
||||
Extension string `json:"extension" gorm:"size:32"`
|
||||
FolderID uint64 `json:"folder_id" gorm:"index;not null"`
|
||||
@@ -31,7 +32,7 @@ func (File) TableName() string {
|
||||
// FileAssociation 业务文件关联模型
|
||||
// 用于兼容 OA 系统的文件关联
|
||||
type FileAssociation struct {
|
||||
ID uint64 `json:"id" gorm:"primaryKey;autoIncrement"`
|
||||
ID uint64 `json:"id" gorm:"primaryKey"`
|
||||
BizID string `json:"biz_id" gorm:"size:128;index;not null"`
|
||||
BizType string `json:"biz_type" gorm:"size:64;index;not null"`
|
||||
FileID uint64 `json:"file_id" gorm:"not null"`
|
||||
@@ -45,7 +46,7 @@ func (FileAssociation) TableName() string {
|
||||
|
||||
// FilePermission 文件权限模型
|
||||
type FilePermission struct {
|
||||
ID uint64 `json:"id" gorm:"primaryKey;autoIncrement"`
|
||||
ID uint64 `json:"id" gorm:"primaryKey"`
|
||||
FileID uint64 `json:"file_id" gorm:"not null"`
|
||||
UserID uint64 `json:"user_id" gorm:"default:0"`
|
||||
RoleID uint64 `json:"role_id" gorm:"default:0"`
|
||||
|
||||
Reference in New Issue
Block a user