cheekylist/backend/models/models.go
2025-07-28 19:54:33 +02:00

27 lines
No EOL
725 B
Go

package models
import "time"
type Checklist struct {
UUID string `json:"uuid"`
Name string `json:"name"`
}
type ChecklistItem struct {
ID int `json:"id"`
Content string `json:"content"`
Checked bool `json:"checked"`
ParentID *int `json:"parent_id"`
LockedBy *string `json:"locked_by,omitempty"`
LockUntil *time.Time `json:"lock_until,omitempty"`
Checklist string `json:"checklist_uuid"`
Dependencies []int `json:"dependencies,omitempty"`
NotBefore *time.Time `json:"not_before,omitempty"`
NotAfter *time.Time `json:"not_after,omitempty"`
}
type ItemLock struct {
LockedBy string
Expires time.Time
ChecklistUUID string
}