models

package
v0.0.0-...-9add964 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *gorm.DB

Functions

func ConnectDatabase

func ConnectDatabase()

Types

type Messages

type Messages struct {
	ID        uint64    `gorm:"primaryKey;autoIncrement" json:"id"`
	MessageID int       `gorm:"type:int" json:"message_id"`
	UserID    string    `gorm:"type:varchar(300)" json:"user_id"`
	Message   string    `gorm:"type:varchar(300)" json:"message"`
	Reply     string    `gorm:"type:varchar(300)" json:"reply"`
	UserName  string    `gorm:"type:varchar(300)" json:"user_name"`
	CreatedAt time.Time `gorm:"type:datetime;default:currentTimestamp" json:"created_at"`
	UserPhoto string    `gorm:"type:varchar(500)" json:"user_photo"`
}

type Users

type Users struct {
	Id       int64  `gorm:"primarykey" json:"id"`
	UserID   string `gorm:"type:text" json:"user_id"`
	UserName string `gorm:"type:varchar(300)" json:"user_name"`
}

Jump to

Keyboard shortcuts

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