events form

This commit is contained in:
gom-by
2025-02-09 14:28:29 +01:00
parent 535b32317e
commit bc7cb196c7
5 changed files with 368 additions and 298 deletions

View File

@@ -7,13 +7,6 @@ import (
"github.com/uptrace/bun"
)
type Status string
const (
Active Status = "Active"
Inactive Status = "Inactive"
)
type Event struct {
bun.BaseModel `bun:"table:events"`
@@ -22,5 +15,7 @@ type Event struct {
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"`
Status Status `bun:"status,notnull,default:'Inactive'" json:"status"`
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"`
}