model

package
v0.0.0-...-1a46f0a Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2024 License: GPL-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 DbFilters

type DbFilters[T any] struct {
	Limit  *int
	Offset *int
	Order  *string
	Model  *T
}

type Message

type Message struct {
	Id                   int           `gorm:"column:id" json:"id"`
	Content              string        `gorm:"column:content" json:"content"`
	RecipientPhoneNumber string        `gorm:"column:recipient_phone_number" json:"recipient_phone_number"`
	Status               MessageStatus `gorm:"column:status" json:"status"`
	CreatedAt            time.Time     `gorm:"column:created_at" json:"created_at"`
	SentAt               *time.Time    `gorm:"column:sent_at" json:"sent_at"`
}

func (Message) TableName

func (Message) TableName() string

type MessageClientResponse

type MessageClientResponse struct {
	Message   string `json:"message"`
	MessageId string `json:"messageId"`
}

type MessageCreateRequest

type MessageCreateRequest struct {
	Content              string `gorm:"column:content" json:"content"`
	RecipientPhoneNumber string `gorm:"column:recipient_phone_number" json:"recipient_phone_number"`
}

func (MessageCreateRequest) Validate

func (m MessageCreateRequest) Validate() error

type MessageRedisPayload

type MessageRedisPayload struct {
	MessageId string `json:"messageId"`
	Timestamp int    `json:"timestamp"`
}

type MessageStatus

type MessageStatus string
const (
	MESSAGE_UNSENT     MessageStatus = "unsent"
	MESSAGE_PROCESSING MessageStatus = "processing"
	MESSAGE_SENT       MessageStatus = "sent"
	MESSAGE_FAILED     MessageStatus = "failed"
)

Jump to

Keyboard shortcuts

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