package schema import "time" // FileHistory demo对象 type FileHistory struct { RecordID string `json:"record_id"` // 记录ID Hash string `json:"hash"` // 文件hash Path string `json:"path"` // 路径 Creator string `json:"creator"` // 创建者,三方服务 FileSize int64 `json:"file_size"` // 文件大小 FileName string `json:"file_name"` // 文件名 IsPersistent int `json:"is_persistent"` // 是否固化(1:持久化2:临时) CreatedAt time.Time `json:"created_at"` FileHash string `json:"file_hash"` //文件hash } const ( TRUE = 1 FALSE = 2 ) // FileHistoryQueryParam 查询条件 type FileHistoryQueryParam struct { Hash string `form:"hash"` FileName string `form:"file_name"` IsPersistent int `form:"is_persistent"` FileHash string `form:"file_hash"` //文件hash } // FileHistoryQueryOptions demo对象查询可选参数项 type FileHistoryQueryOptions struct { PageParam *PaginationParam // 分页参数 } // FileHistoryQueryResult demo对象查询结果 type FileHistoryQueryResult struct { Data []*FileHistory PageResult *PaginationResult }