gohorsejobs/backend/internal/models/notification.go

23 lines
667 B
Go

package models
import "time"
type Notification struct {
ID string `json:"id"`
UserID string `json:"userId"`
Type string `json:"type"` // info, success, warning, error
Title string `json:"title"`
Message string `json:"message"`
Link *string `json:"link,omitempty"`
ReadAt *time.Time `json:"readAt,omitempty"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
type CreateNotificationRequest struct {
UserID string `json:"userId"`
Type string `json:"type"`
Title string `json:"title"`
Message string `json:"message"`
Link *string `json:"link,omitempty"`
}