1234567891011121314151617181920212223242526 |
- package app
- import "time"
- type Picture struct {
- ID int `json:"id" gorm:"id"`
- EventId int `json:"eventId" gorm:"event_id"`
- Name string `json:"name" gorm:"name"`
- Time time.Time `json:"time" gorm:"time"`
- Mime string `json:"mime" gorm:"mime"`
- Size int `json:"size" gorm:"size"`
- DataId int `json:"dataId" gorm:"data_id"`
- }
- func (Picture) TableName() string {
- return "picture"
- }
- type PictureData struct {
- ID int `json:"id" gorm:"id"`
- Data []byte `json:"data" gorm:"data"`
- }
- func (PictureData) TableName() string {
- return "picture_data"
- }
|