Discover Packages
github.com/FlameInTheDark/gochat
internal
database
model
package
Version:
v1.3.0
Opens a new window with list of versions in this module.
Published: Sep 22, 2025
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
type Audit struct {
GuildId int64 `db:"guild_id"`
CreatedAt time .Time `db:"created_at"`
Changes map[string ]string `db:"changes"`
}
type Authentication struct {
UserId int64 `db:"user_id"`
Email string `db:"email"`
PasswordHash string `db:"password_hash"`
CreatedAt time .Time `db:"created_at"`
}
type Channel struct {
Id int64 `db:"id"`
Name string `db:"name"`
Type ChannelType `db:"type"`
ParentID *int64 `db:"parent_id"`
Permissions *int64 `db:"permissions"`
Topic *string `db:"topic"`
Private bool `db:"private"`
LastMessage int64 `db:"last_message"`
CreatedAt time .Time `db:"created_at"`
}
type ChannelRolesPermission struct {
ChannelId int64 `db:"channel_id"`
RoleId int64 `db:"role_id"`
Accept int64 `db:"accept"`
Deny int64 `db:"deny"`
}
const (
ChannelTypeGuild ChannelType = iota
ChannelTypeGuildVoice
ChannelTypeGuildCategory
ChannelTypeDM
ChannelTypeGroupDM
ChannelTypeThread
)
type ChannelUserPermission struct {
ChannelId int64 `db:"channel_id"`
UserId int64 `db:"user_id"`
Accept int64 `db:"accept"`
Deny int64 `db:"deny"`
}
type DMChannel struct {
UserId int64 `db:"user_id"`
ParticipantId int64 `db:"participant_id"`
ChannelId int64 `db:"channel_id"`
}
type Discriminator struct {
UserId int64 `db:"user_id"`
Discriminator string `db:"discriminator"`
}
type Friend struct {
UserID int64 `db:"user_id"`
FriendID int64 `db:"friend_id"`
CreatedAt time .Time `db:"created_at"`
}
type GroupDMChannel struct {
ChannelId int64 `db:"channel_id"`
UserId int64 `db:"user_id"`
}
type Guild struct {
Id int64 `db:"id"`
Name string `db:"name"`
OwnerId int64 `db:"owner_id"`
Icon *int64 `db:"icon"`
Public bool `db:"public"`
Permissions int64 `db:"permissions"`
CreatedAt time .Time `db:"created_at"`
}
type GuildChannel struct {
GuildId int64 `db:"guild_id"`
ChannelId int64 `db:"channel_id"`
Position int `db:"position"`
}
type GuildChannelUpdatePosition struct {
GuildId int64
ChannelId int64
Position int
}
type GuildInvite struct {
InviteCode string `db:"invite_code"`
InviteId int64 `db:"invite_id"`
GuildId int64 `db:"guild_id"`
AuthorId int64 `db:"author_id"`
CreatedAt time .Time `db:"created_at"`
ExpiresAt time .Time `db:"expires_at"`
}
GuildInvite represents an invite joined with its code and metadata
type Member struct {
UserId int64 `db:"user_id"`
GuildId int64 `db:"guild_id"`
Username *string `db:"username"`
Avatar *int64 `db:"avatar"`
JoinAt time .Time `db:"join_at"`
Timeout time .Time `db:"timeout"`
}
const (
MessageTypeSystem MessageType = iota
MessageTypeChat
MessageTypeReply
)
type Recovery struct {
UserId int64 `db:"user_id"`
Token string `db:"token"`
ExpiresAt time .Time `db:"expires_at"`
CreatedAt time .Time `db:"created_at"`
}
type Registration struct {
UserId int64 `db:"user_id"`
Email string `db:"email"`
ConfirmationToken string `db:"confirmation_token"`
CreatedAt time .Time `db:"created_at"`
}
type Role struct {
Id int64 `db:"id"`
GuildId int64 `db:"guild_id"`
Name string `db:"name"`
Color int `db:"color"`
Permissions int64 `db:"permissions"`
}
type User struct {
Id int64 `json:"id" db:"id"`
Name string `json:"name" db:"name"`
Avatar *int64 `json:"avatar" db:"avatar"`
Blocked bool `json:"blocked" db:"blocked"`
UploadLimit *int64 `json:"upload_limit" db:"upload_limit"`
CreatedAt time .Time `json:"created_at" db:"created_at"`
}
type UserGuild struct {
UserId int64 `db:"user_id"`
GuildId int64 `db:"guild_id"`
}
type UserRole struct {
GuildId int64 `db:"guild_id"`
UserId int64 `db:"user_id"`
RoleId int64 `db:"role_id"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.