picture.go 601 B

1234567891011121314151617181920212223242526
  1. package app
  2. import "time"
  3. type Picture struct {
  4. ID int `json:"id" gorm:"id"`
  5. EventId int `json:"eventId" gorm:"event_id"`
  6. Name string `json:"name" gorm:"name"`
  7. Time time.Time `json:"time" gorm:"time"`
  8. Mime string `json:"mime" gorm:"mime"`
  9. Size int `json:"size" gorm:"size"`
  10. DataId int `json:"dataId" gorm:"data_id"`
  11. }
  12. func (Picture) TableName() string {
  13. return "picture"
  14. }
  15. type PictureData struct {
  16. ID int `json:"id" gorm:"id"`
  17. Data []byte `json:"data" gorm:"data"`
  18. }
  19. func (PictureData) TableName() string {
  20. return "picture_data"
  21. }