models

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 28, 2026 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NotificationStats

type NotificationStats struct {
	UnreadCount int `db:"unread_count" json:"unread_count"`
	TotalCount  int `db:"total_count" json:"total_count"`
}

NotificationStats holds notification statistics for a user.

type NotificationType

type NotificationType string

NotificationType represents the type of user notification.

const (
	NotificationTypeMention    NotificationType = "mention"
	NotificationTypeAssignment NotificationType = "assignment"
	NotificationTypeSLAWarning NotificationType = "sla_warning"
	NotificationTypeSLABreach  NotificationType = "sla_breach"
)

type UserNotification

type UserNotification struct {
	ID               int              `db:"id" json:"id"`
	CreatedAt        time.Time        `db:"created_at" json:"created_at"`
	UpdatedAt        time.Time        `db:"updated_at" json:"updated_at"`
	UserID           int              `db:"user_id" json:"user_id"`
	NotificationType NotificationType `db:"notification_type" json:"notification_type"`
	Title            string           `db:"title" json:"title"`
	Body             null.String      `db:"body" json:"body"`
	IsRead           bool             `db:"is_read" json:"is_read"`
	ConversationID   null.Int         `db:"conversation_id" json:"conversation_id"`
	MessageID        null.Int         `db:"message_id" json:"message_id"`
	ActorID          null.Int         `db:"actor_id" json:"actor_id"`
	Meta             json.RawMessage  `db:"meta" json:"meta"`

	// Joined fields from related tables
	ActorFirstName   null.String `db:"actor_first_name" json:"actor_first_name"`
	ActorLastName    null.String `db:"actor_last_name" json:"actor_last_name"`
	ActorAvatarURL   null.String `db:"actor_avatar_url" json:"actor_avatar_url"`
	ConversationUUID null.String `db:"conversation_uuid" json:"conversation_uuid"`
	MessageUUID      null.String `db:"message_uuid" json:"message_uuid"`
}

UserNotification represents an in-app notification for a user.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL