s_file_history.go 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. package schema
  2. import "time"
  3. // FileHistory demo对象
  4. type FileHistory struct {
  5. RecordID string `json:"record_id"` // 记录ID
  6. Hash string `json:"hash"` // 文件hash
  7. Path string `json:"path"` // 路径
  8. Creator string `json:"creator"` // 创建者,三方服务
  9. FileSize int64 `json:"file_size"` // 文件大小
  10. FileName string `json:"file_name"` // 文件名
  11. IsPersistent int `json:"is_persistent"` // 是否固化(1:持久化2:临时)
  12. CreatedAt time.Time `json:"created_at"`
  13. FileHash string `json:"file_hash"` //文件hash
  14. }
  15. const (
  16. TRUE = 1
  17. FALSE = 2
  18. )
  19. // FileHistoryQueryParam 查询条件
  20. type FileHistoryQueryParam struct {
  21. Hash string `form:"hash"`
  22. FileName string `form:"file_name"`
  23. IsPersistent int `form:"is_persistent"`
  24. FileHash string `form:"file_hash"` //文件hash
  25. }
  26. // FileHistoryQueryOptions demo对象查询可选参数项
  27. type FileHistoryQueryOptions struct {
  28. PageParam *PaginationParam // 分页参数
  29. }
  30. // FileHistoryQueryResult demo对象查询结果
  31. type FileHistoryQueryResult struct {
  32. Data []*FileHistory
  33. PageResult *PaginationResult
  34. }