Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var EntityTypes = map[string]interface{}{ "user": true, "lead": true, "public": true, }
View Source
var NotificationStatus = map[string]interface{}{ "draft": true, "sending_request": true, "failed": true, "completed": true, }
View Source
var NotificationTypes = map[string]interface{}{ "mail": true, }
Functions ¶
func PermitParams ¶
Types ¶
type GormBase ¶
type Notification ¶
type Notification struct { GormBase EntityID string `json:"entity_id" sql:"type:uuid" gorm:"type:uuid; index"` EntityType string `json:"entity_type" gorm:"type:varchar(10); index; not null"` NotificationType string `json:"type" gorm:"type:varchar(16); index; not null;"` RequestData JSONB `json:"request_data" sql:"type:jsonb" gorm:"type:jsonb"` ResponseData JSONB `json:"response_data" sql:"type:jsonb" gorm:"type:jsonb"` Status string `json:"status" gorm:"type:varchar(32); not null; index; default:draft"` Success bool `json:"success" gorm:"default:false;"` SentTime time.Time `json:"sent_time"` }
func CreateNotification ¶
func CreateNotification(Db *gorm.DB, params map[string]interface{}) (Notification, bool, string, string)
Function to create Notification Object
func (Notification) BeforeSave ¶
func (notification Notification) BeforeSave(tx *gorm.DB) (err error)
Click to show internal directories.
Click to hide internal directories.