package model import "time" // ContractFolder 业务合同批量归档文件夹(与 Contract 共用体系,用于归档批量上传) type ContractFolder struct { ID uint `gorm:"primaryKey" json:"id"` Name string `gorm:"size:100;not null" json:"name"` Description string `gorm:"size:500" json:"description"` CreateTime time.Time `json:"createTime"` UpdateTime time.Time `json:"updateTime"` } // ContractBatch 一次批量上传记录(归属某文件夹) type ContractBatch struct { ID uint `gorm:"primaryKey" json:"id"` FolderID uint `gorm:"index;not null" json:"folderId"` BatchName string `gorm:"size:200;not null" json:"batchName"` Remark string `gorm:"size:500" json:"remark"` CreateTime time.Time `json:"createTime"` UpdateTime time.Time `json:"updateTime"` Files []ContractBatchFile `gorm:"foreignKey:BatchID" json:"files"` } // ContractBatchFile 批量上传中的单个文件 type ContractBatchFile struct { ID uint `gorm:"primaryKey" json:"id"` BatchID uint `gorm:"index;not null" json:"batchId"` Name string `gorm:"size:255;not null" json:"name"` URL string `gorm:"size:500;not null" json:"url"` FileSize int64 `gorm:"default:0" json:"fileSize"` }