forked from nixcn/nixcn-cms
29 lines
686 B
Go
29 lines
686 B
Go
package data
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
type Event struct {
|
|
Id uint `json:"id" gorm:"primarykey;autoincrement"`
|
|
UUID uuid.UUID `json:"uuid" gorm:"type:uuid;uniqueindex;not null"`
|
|
EventId uuid.UUID `json:"event_id" gorm:"type:uuid;uniqueindex;not null"`
|
|
Name string `json:"name" gorm:"type:varchar(255);index;not null"`
|
|
StartTime time.Time `json:"start_time" gorm:"index"`
|
|
EndTime time.Time `json:"end_time" gorm:"index"`
|
|
}
|
|
|
|
func (self *Event) GetEventById(eventId uuid.UUID) error {
|
|
return nil
|
|
}
|
|
|
|
func (self *Event) UpdateEventById(eventId uuid.UUID) error {
|
|
return nil
|
|
}
|
|
|
|
func (self *Event) CreateEvent() error {
|
|
return nil
|
|
}
|