message

package
v1.0.68 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MessageService

type MessageService struct {
	InboxService *inbox.InboxService
	ChatService  *chat.ChatService
	// contains filtered or unexported fields
}

func NewMessageService

func NewMessageService(ctx *context.ERPContext) *MessageService

NewMessageService creates a new instance of MessageService with the given database connection and context.

It initializes the InboxService and ChatService and calls the Migrate method of the MessageService to create the necessary database schema.

func (*MessageService) Migrate

func (cs *MessageService) Migrate() error

Migrate migrates the database schema for the MessageService.

If the SkipMigration flag is set to true in the context, this method will not perform any migration and will return nil. Otherwise, it will attempt to auto-migrate the database to include the InboxModel, InboxMessageModel, ChatChannelModel, and ChatMessageModel schemas. If the migration process encounters an error, it will return that error. Otherwise, it will return nil upon successful migration.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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