package app

import "time"

type Picture struct {
	ID      int       `json:"id" gorm:"id;comment:id"`
	EventId int       `json:"eventId" gorm:"event_id;comment:事件id"`
	Name    string    `json:"name" gorm:"name;comment:名称"`
	Time    time.Time `json:"time" gorm:"time;comment:时间"`
	Mime    string    `json:"mime" gorm:"mime;comment:协议"`
	Size    int       `json:"size" gorm:"size;comment:尺寸"`
	DataId  int       `json:"dataId" gorm:"data_id;comment:数据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"
}