first commit
This commit is contained in:
33
internal/dm/model.go
Normal file
33
internal/dm/model.go
Normal file
@@ -0,0 +1,33 @@
|
||||
package dm
|
||||
|
||||
import "time"
|
||||
|
||||
type EventType string
|
||||
|
||||
const (
|
||||
EventWelcome EventType = "welcome"
|
||||
EventExpiringSoon EventType = "expiring_soon"
|
||||
EventExpired EventType = "expired"
|
||||
EventExtended EventType = "extended"
|
||||
)
|
||||
|
||||
type Status string
|
||||
|
||||
const (
|
||||
StatusPending Status = "pending"
|
||||
StatusDelivered Status = "delivered"
|
||||
StatusDead Status = "dead"
|
||||
)
|
||||
|
||||
type OutboxItem struct {
|
||||
ID int64
|
||||
EventType EventType
|
||||
Pubkey string
|
||||
Content string
|
||||
Attempts int
|
||||
LastAttemptAt *time.Time
|
||||
NextAttemptAt time.Time
|
||||
Status Status
|
||||
LastError string
|
||||
CreatedAt time.Time
|
||||
}
|
||||
Reference in New Issue
Block a user