Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateNotification ¶
CreateNotification creates a notification from given parameters
Types ¶
type Answer ¶
type Answer struct { gorm.Model Type uint8 SliderValue uint SliderMax uint SliderMin uint QuestionTempUUID string QuestionAnswers string TrueOrFalse bool FullID uint }
Answer Data Model
type Form ¶
type Form struct { gorm.Model Title string Description string Questions []Question UniqueID string User User UserID uint ReceiveMessages bool CustomMessage string }
Form data model
type FormQuestion ¶
type FormQuestion struct { Form common.JSON `json:"form"` Questions []common.JSON `json:"questions"` }
FormQuestion is used when returning an array with questions and the form
func (*FormQuestion) Serialize ¶
func (fq *FormQuestion) Serialize() common.JSON
Serialize form question data
type Notification ¶
type Notification struct { gorm.Model Title string UserID uint User User Content string UUID string Read bool }
Notification model struct
func GetNotificationWithID ¶
func GetNotificationWithID(uuid string, db *gorm.DB) (Notification, bool)
GetNotificationWithID finds a notification with an id and returns the ok status
func (*Notification) Serialize ¶
func (notification *Notification) Serialize() common.JSON
Serialize notification model to JSON format
Click to show internal directories.
Click to hide internal directories.