models

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: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActivePeerRoomModel

type ActivePeerRoomModel struct {
	PeerUserId         uuid.UUID `json:"peerUserId" bson:"peerUserId"`
	SocialName         string    `json:"socialName" bson:"socialName"`
	ResponseActionType string    `json:"responseActionType" bson:"responseActionType"`
}

type DispatchProfilesModel

type DispatchProfilesModel struct {
	UserIds   []string  `json:"userIds" bson:"userIds"`
	ReqUserId uuid.UUID `json:"reqUserId" bson:"reqUserId"`
}

type GetProfilesModel

type GetProfilesModel struct {
	UserIds []string `json:"userIds" bson:"userIds"`
}

type GetUserRoomsModel

type GetUserRoomsModel struct {
	UserId uuid.UUID `json:"userId" bson:"userId"`
}

type MessageModel

type MessageModel 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 QueryMessageModel

type QueryMessageModel struct {
	ReqUserId uuid.UUID `json:"reqUserId" bson:"reqUserId"`
	RoomId    uuid.UUID `json:"roomId" bson:"roomId"`
	Page      int64     `json:"page" bson:"page"`
	Lte       int64     `json:"lte" bson:"lte"`
	Gte       int64     `json:"gte" bson:"gte"`
}

type ResUserRoomModel

type ResUserRoomModel struct {
	Rooms   map[string]interface{} `json:"rooms" bson:"rooms"`
	RoomIds []string               `json:"roomIds" bson:"roomIds"`
}

type RoomMemberModel

type RoomMemberModel struct {
	ObjectId uuid.UUID `json:"objectId"`
	FullName string    `json:"fullName"`
	Avatar   string    `json:"avatar"`
	LastSeen int64     `json:"lastSeen"`
}

type RoomModel

type RoomModel 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"`
}

type SaveMessagesModel

type SaveMessagesModel struct {
	UserId         uuid.UUID      `json:"userId" bson:"userId"`
	RoomId         uuid.UUID      `json:"roomId" bson:"roomId"`
	Messages       []MessageModel `json:"messages" bson:"messages"`
	DeactivePeerId uuid.UUID      `json:"deactivePeerId" bson:"deactivePeerId"`
}

type UpdateReadMessageModel

type UpdateReadMessageModel struct {
	RoomId             uuid.UUID `json:"roomId" bson:"roomId"`
	Amount             int64     `json:"amount" bson:"amount"`
	MessageCreatedDate int64     `json:"messageCreatedDate" bson:"messageCreatedDate"`
	MessageId          uuid.UUID `json:"messageId" bson:"messageId"`
}

type UserModel

type UserModel struct {
	ObjectId    uuid.UUID `json:"objectId"`
	FullName    string    `json:"fullName"`
	Avatar      string    `json:"avatar"`
	Banner      string    `json:"banner"`
	TagLine     string    `json:"tagLine"`
	Birthday    int64     `json:"birthday"`
	WebUrl      string    `json:"webUrl"`
	CompanyName string    `json:"companyName"`
	FacebookId  string    `json:"facebookId"`
	InstagramId string    `json:"instagramId"`
	TwitterId   string    `json:"twitterId"`
}

type UserProfileModel

type UserProfileModel struct {
	ObjectId       uuid.UUID                     `json:"objectId" bson:"objectId"`
	FullName       string                        `json:"fullName" bson:"fullName"`
	SocialName     string                        `json:"socialName" bson:"socialName"`
	Avatar         string                        `json:"avatar" bson:"avatar"`
	Banner         string                        `json:"banner" bson:"banner"`
	TagLine        string                        `json:"tagLine" bson:"tagLine"`
	CreatedDate    int64                         `json:"created_date" bson:"created_date"`
	LastUpdated    int64                         `json:"last_updated" bson:"last_updated"`
	LastSeen       int64                         `json:"lastSeen" bson:"lastSeen"`
	Email          string                        `json:"email" bson:"email"`
	Birthday       int64                         `json:"birthday" bson:"birthday"`
	WebUrl         string                        `json:"webUrl" bson:"webUrl"`
	CompanyName    string                        `json:"companyName" bson:"companyName"`
	VoteCount      int64                         `json:"voteCount" bson:"voteCount"`
	ShareCount     int64                         `json:"shareCount" bson:"shareCount"`
	FollowCount    int64                         `json:"followCount" bson:"followCount"`
	FollowerCount  int64                         `json:"followerCount" bson:"followerCount"`
	PostCount      int64                         `json:"postCount" bson:"postCount"`
	FacebookId     string                        `json:"facebookId" bson:"facebookId"`
	InstagramId    string                        `json:"instagramId" bson:"instagramId"`
	TwitterId      string                        `json:"twitterId" bson:"twitterId"`
	AccessUserList []string                      `json:"accessUserList" bson:"accessUserList"`
	Permission     constants.UserPermissionConst `json:"permission" bson:"permission"`
}

Jump to

Keyboard shortcuts

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