// Package entity holds conversation domain types. package entity // Type is persisted as conversations.type. type Type int const ( TypeP2P Type = 1 TypeGroup Type = 2 ) func (t Type) Valid() bool { return t == TypeP2P || t == TypeGroup } // Conversation is a P2P or group chat. LastMsgID is the Snowflake cursor, not ConversationSeq. type Conversation struct { ID int64 Type Type LastMsgID int64 LastMsgAt int64 } // DialogFace is the viewer-relative identity of one conversation. // PeerID is the other member of a P2P chat. GroupID is groups.id, not the conversation id. type DialogFace struct { ConversationID int64 Type Type PeerID int64 GroupID int64 LastReadMsgID int64 }