dto

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

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

Go to latest
Published: Aug 16, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	ObjectId    uuid.UUID `json:"objectId" bson:"objectId"`
	OwnerUserId uuid.UUID `json:"ownerUserId" bson:"ownerUserId"`
	RoomId      uuid.UUID `json:"roomId" bson:"roomId"`
	Text        string    `json:"text" bson:"text"`
	CreatedDate int64     `json:"createdDate" bson:"createdDate"`
	UpdatedDate int64     `json:"updatedDate" bson:"updatedDate"`
}

type Room

type Room struct {
	ObjectId      uuid.UUID              `json:"objectId" bson:"objectId"`
	Members       []string               `json:"members" bson:"members"`
	Type          int8                   `json:"type" bson:"type"`                   // {0: peer, 1: multiple}
	ReadDate      map[string]int64       `json:"readDate" bson:"readDate"`           // {'userId1': last_seen_date_time, 'userId2': last_seen_date_time}
	ReadCount     map[string]int64       `json:"readCount" bson:"readCount"`         // {'userId1': read_count, 'userId2': read_count}
	ReadMessageId map[string]string      `json:"readMessageId" bson:"readMessageId"` // {'userId1': 'message_id_234', 'userId2': 'message_id_2323'}
	DeactiveUsers []string               `json:"deactiveUsers" bson:"deactiveUsers"` // ['userId1', 'userId2']
	LastMessage   map[string]interface{} `json:"lastMessage" bson:"lastMessage"`     // {'text': 'message_text', 'ownerId': 'userId'}
	MemberCount   int64                  `json:"memberCount" bson:"memberCount"`
	MessageCount  int64                  `json:"messageCount" bson:"messageCount"`
	CreatedDate   int64                  `json:"createdDate" bson:"createdDate"`
	UpdatedDate   int64                  `json:"updatedDate" bson:"updatedDate"`
}

Jump to

Keyboard shortcuts

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