Files
nixcn-cms/data/event.go
2025-12-25 21:30:26 +08:00

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
}