22 lines
747 B
Go
22 lines
747 B
Go
package models
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/google/uuid"
|
|
"github.com/uptrace/bun"
|
|
)
|
|
|
|
type Event struct {
|
|
bun.BaseModel `bun:"table:events"`
|
|
|
|
EventID uuid.UUID `bun:"event_id,type:uuid,pk,default:gen_random_uuid()" json:"id"`
|
|
Title string `bun:"title,notnull" json:"title"`
|
|
CreationDate time.Time `bun:"creation_date,notnull,default:current_timestamp" json:"creationDate"`
|
|
ScheduleStart time.Time `bun:"schedule_start,notnull" json:"start"`
|
|
ScheduleEnd time.Time `bun:"schedule_end,notnull" json:"end"`
|
|
FullDay bool `bun:"full_day,notnull,default:false" json:"fullDay"`
|
|
IsVisible bool `bun:"is_visible,notnull,default:true" json:"isVisible"`
|
|
Rrule string `bun:"rrule" json:"rrule"`
|
|
}
|