Albirew/nyaa-pantsu
Albirew
/
nyaa-pantsu
Archivé
1
0
Bifurcation 0

Update notification.go

Cette révision appartient à :
kilo 2017-10-29 00:17:31 +02:00 révisé par GitHub
Parent b03053290c
révision 0cfe7073b7
Signature inconnue de Forgejo
ID de la clé GPG: 4AEE18F83AFDEB23
1 fichiers modifiés avec 2 ajouts et 1 suppressions

Voir le fichier

@ -15,13 +15,14 @@ type Notification struct {
Identifier string
URL string
Expire time.Time
Date time.Time
UserID uint
// User *User `gorm:"AssociationForeignKey:UserID;ForeignKey:user_id"` // Don't think that we need it here
}
// NewNotification : Create a new notification
func NewNotification(identifier string, c string, url string) Notification {
return Notification{Identifier: identifier, Content: c, URL: url}
return Notification{Identifier: identifier, Content: c, URL: url, Date: time.Now()}
}
// TableName : Return the name of notification table