Added notificaiton model
This commit is contained in:
33
models/notification.go
Normal file
33
models/notification.go
Normal file
@@ -0,0 +1,33 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/jinzhu/gorm"
|
||||
)
|
||||
|
||||
type Notification struct {
|
||||
gorm.Model
|
||||
Title string
|
||||
NotificationType string
|
||||
Text string
|
||||
UserID int
|
||||
}
|
||||
|
||||
|
||||
type GetNotificationsResponse struct {
|
||||
Type string `json:"type"`
|
||||
Title string `json:"title"`
|
||||
Message string `json:"message"`
|
||||
DateTime time.Time `json:"datetime"`
|
||||
}
|
||||
|
||||
func (Notification) Update() (bool, error) {
|
||||
return false, nil
|
||||
}
|
||||
func (Notification) Create() (bool, error) {
|
||||
return false, nil
|
||||
}
|
||||
func (Notification) Delete() (bool, error) {
|
||||
return false, nil
|
||||
}
|
||||
Reference in New Issue
Block a user