models

package
v0.0.0-...-be62591 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 31, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel struct {
	ID   int    `gorm:"primary_key" json:"id"`
	Name string `gorm:"unique, not null" json:"name"`
}

type Channel_User

type Channel_User struct {
	ChannelID int `gorm:"primary_key" json:"channel_id"`
	UserID    int `gorm:"primary_key" json:"user_id"`
}

type Favorited_User

type Favorited_User struct {
	UserID           int `gorm:"primary_key" json:"user_id"`
	Favorited_UserID int `gorm:"primary_key" json:"favorited_user_id"`
}

type Message

type Message struct {
	ID        int    `gorm:"primary_key" json:"id"`
	UserID    int    `json:"user_id"`
	ChannelID int    `json:"channel_id"`
	Content   string `gorm:"not null" json:"content"`
	Time      int64  `gorm:"not null" json:"time"`
}

type User

type User struct {
	ID       int    `gorm:"primary_key" json:"id"`
	Username string `gorm:"not null" json:"username"`
	Email    string `gorm:"not null" json:"email"`
	Password []byte `gorm:"not null" json:"-"` // Security MAX!!!
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL