Added notificaiton model

This commit is contained in:
Nedim
2023-10-09 18:23:44 +02:00
parent 00d15ebe7e
commit abe79e5556
8 changed files with 249 additions and 10 deletions

33
models/notification.go Normal file
View 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
}