models.go 329 B

1234567891011121314151617181920212223242526272829
  1. package files
  2. import "github.com/jinzhu/gorm"
  3. const (
  4. filetype_text = iota
  5. filetype_image = iota
  6. filetype_video = iota
  7. filetype_audio = iota
  8. )
  9. type File struct {
  10. gorm.Model
  11. Storage Storage
  12. StorageID uint
  13. RelativePath string
  14. FileType int
  15. }
  16. type Storage struct {
  17. gorm.Model
  18. AbsolutePath string
  19. }
  20. // TODO storage