model

package
v0.0.0-...-d201b6c Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *gorm.DB

DB 数据库链接单例

Functions

func Database

func Database(connString string)

Database 在中间件中初始化mysql链接

Types

type Message

type Message struct {
	Id         int64 `gorm:"primary_key"`
	FromUserId int64
	ToUserId   int64
	Content    string
	CreateAt   time.Time
	DeletedAt  gorm.DeletedAt
}

func (Message) TableName

func (Message) TableName() string

type MessageDao

type MessageDao struct {
}

func NewMessageDaoInstance

func NewMessageDaoInstance() *MessageDao

func (*MessageDao) CreateMessage

func (*MessageDao) CreateMessage(message *Message) error

* 创建一条消息

func (*MessageDao) QueryMessage

func (d *MessageDao) QueryMessage(toUserId int64, FromUserId int64) *to_relation.QueryBody

*

func (*MessageDao) QueryMessageList

func (*MessageDao) QueryMessageList(date *string, fromUserId int64, ToUserId int64) []*Message

* 查询消息记录

根据时间和需要查询的条数,获取video列表

Jump to

Keyboard shortcuts

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