12345678910111213141516171819202122232425262728 |
- 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"`
- }
- // TableName Picture 表名
- func (Picture) TableName() string {
- return "picture"
- }
- type PictureData struct {
- ID int `json:"id" gorm:"id"`
- Data []byte `json:"data" gorm:"data"`
- }
- // TableName PictureData 表名
- func (PictureData) TableName() string {
- return "picture_data"
- }
|