model

package
v0.0.0-...-20673c3 Latest Latest
Warning

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

Go to latest
Published: May 24, 2021 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Login  = `login`
	Logout = `logout`
)

Variables

This section is empty.

Functions

This section is empty.

Types

type LoginLog

type LoginLog struct {
	UUID       string `json:"uuid" bson:"uuid"`
	IP         string `json:"ip" bson:"ip"`
	LogType    string `json:"log_type" bson:"log_type"`
	Username   string `json:"username" bson:"username"`
	InsertTime int64  `json:"insert_time" bson:"insert_time"`
}

type Message

type Message struct {
	UUID        string              `json:"uuid" bson:"uuid"`
	IP          string              `json:"ip" bson:"ip"`
	ToUUID      string              `json:"to_uuid" bson:"to_uuid"`
	MessageType string              `json:"message_type" bson:"message_type"`
	Username    string              `json:"username" bson:"username"`
	Content     string              `json:"content" bson:"content"`
	MessageTime int                 `json:"message_time" bson:"message_time"`
	UserList    []map[string]string `json:"user_list" bson:"user_list"`
	InsertTime  int64               `json:"insert_time" bson:"insert_time"`
}

数据传输的数据结构

type MessageResponse

type MessageResponse struct {
	UUID        string `json:"uuid" bson:"uuid"`
	IP          string `json:"ip" bson:"ip"`
	ToUUID      string `json:"to_uuid" bson:"to_uuid"`
	MessageType string `json:"message_type" bson:"message_type"`
	Username    string `json:"username" bson:"username"`
	Content     string `json:"content" bson:"content"`
	MessageTime int    `json:"message_time" bson:"message_time"`
	InsertTime  int64  `json:"insert_time" bson:"insert_time"`
}

历史消息数据数据响应的数据结构

Jump to

Keyboard shortcuts

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