CRUD Events and React interaction

This commit is contained in:
cdricms
2025-01-27 17:58:47 +01:00
parent 9843158803
commit ac7e97527f
17 changed files with 887 additions and 349 deletions

View File

@@ -97,11 +97,11 @@ func Verify(ctx context.Context, email, password string) (*User, error) {
type Event struct {
bun.BaseModel `bun:"table:events"`
EventID uuid.UUID `bun:"type:uuid,pk,default:gen_random_uuid()" json:"eventID"`
EventID uuid.UUID `bun:"event_id,type:uuid,pk,default:gen_random_uuid()" json:"id"`
CreationDate time.Time `bun:"creation_date,notnull,default:current_timestamp" json:"creationDate"`
ScheduleStart time.Time `bun:"schedule_start,notnull" json:"scheduleStart"`
ScheduleEnd time.Time `bun:"schedule_end,notnull" json:"scheduleEnd"`
Status Status `bun:"status,notnull,default:Inactive" json:"status"`
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"`
}
type EventToUser struct {