Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConversationORM ¶
type ConversationORM struct { orm.Model Type chatpb.Conversation_Type Status chatpb.Conversation_Status CreatorUid string ManagerUid string // 当前成员列表的冗余数据 MemberUids pq.StringArray `gorm:"type:text[]"` }
func (*ConversationORM) ApplyPb ¶
func (t *ConversationORM) ApplyPb(pb *chatpb.Conversation)
func (*ConversationORM) TableName ¶
func (t *ConversationORM) TableName() string
func (*ConversationORM) ToPb ¶
func (t *ConversationORM) ToPb() *chatpb.Conversation
type MessageORM ¶
type MessageORM struct { orm.Model Cid string SenderUid string Type chatpb.Body_Type Body *chatpb.Body `gorm:"type:json"` }
func (*MessageORM) TableName ¶
func (t *MessageORM) TableName() string
type UidConversationORM ¶
type UidConversationORM struct { orm.Model Uid string Cid string Conversation *ConversationORM `gorm:"foreignkey:Cid;association_foreignkey:Id;"` Mute bool // 此对话是否静音 EnterTime time.Time QuitTime *time.Time }
对于同一个uid-cid,可能存在多个,但是QuitTime为NULL的肯定只有一个 每条记录是一个区间的意思
func (*UidConversationORM) TableName ¶
func (t *UidConversationORM) TableName() string
func (*UidConversationORM) ToPb ¶
func (t *UidConversationORM) ToPb() *chatpb.UidConversation
Click to show internal directories.
Click to hide internal directories.