db

package
v0.0.0-...-3b276ab Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PgDb *gorm.DB

Functions

func Init

func Init()

func SendFriendMessage

func SendFriendMessage(ctx context.Context, fromUserId int64, toUserId int64, content string) error

Types

type Message

type Message struct {
	ID        int64     `gorm:"primaryKey;column:id"`
	CreatedAt time.Time `gorm:"column:create_time"`
	ChatId    int64     `gorm:"column:chat_id"`
	Content   string    `gorm:"column:content"`
	SenderId  int64     `gorm:"column:sender"`
}

func ListFriendMessage

func ListFriendMessage(ctx context.Context, fromUserId int64, toUserId int64, preMsgTime int64) ([]*Message, error)

Jump to

Keyboard shortcuts

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