Documentation ¶
Index ¶
Constants ¶
View Source
const ( MessageNormal = iota MessageImage MessageFile )
View Source
const ( TokenAuthentication = iota TokenResetPassword TokenVerification )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Chat ¶
type Chat struct { gorm.Model `json:"-"` DisplayName string `json:"name"` UUID string `json:"uuid"` Users []User `json:"users" gorm:"many2many:user_chats"` Messages []Message `json:"messages" gorm:"foreignkey:ChatId"` }
Stores user chat information
type File ¶
type File struct { gorm.Model `json:"-"` Path string `json:"-"` Filename string `json:"filename"` UUID string `json:"uuid"` Used bool `json:"used"` ChatId uint `json:"-"` }
Stores file information related to messages
type Message ¶
type Message struct { gorm.Model `json:"-"` ChatId uint `json:"-"` SenderId uint `json:"-"` Sender User `json:"sender" gorm:"foreignkey:SenderId"` Type uint `json:"type"` Message string `json:"message"` File *File `json:"file" gorm:"foreignkey:FileId"` FileId uint `json:"-"` Timestamp int64 `json:"timestamp"` }
Stores user message information
Click to show internal directories.
Click to hide internal directories.