// 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 }