package models

import "database/sql/driver"

// What a notification is caused by
type NotificationCauseType uint8

const (
	NotificationTypeReply         NotificationCauseType = iota // A new reply
	NotificationTypeReaction                                   // A new reaction
	NotificationTypeBoost                                      // A note got boosted
	NotificationTypeFollowRequest                              // Someone requested to follow
)

func (r *NotificationCauseType) Value() (driver.Value, error) {
	return r, nil
}

func (ct *NotificationCauseType) Scan(value any) error {
	*ct = NotificationCauseType(value.(uint8))
	return nil
}
