models

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chats

type Chats struct {
	ChatId   uuid.UUID `gorm:"primaryKey; type:uuid; default:uuid_generate_v4(); column:chat_id" json:"chat_id"`
	LastMsg  string    `gorm:"column:last_msg" json:"last_msg"`
	SenderId uuid.UUID `gorm:"column:sender_id" json:"sender_id"`
	User     Users     `gorm:"foreignKey:SenderId; references:UserId"`
}

type Users

type Users struct {
	UserId     uuid.UUID `gorm:"primaryKey; column:user_id; type:uuid; default:uuid_generate_v4()" json:"userid"`
	Password   string    `gorm:"not null" json:"password"`
	Email      string    `gorm:"unique; not null" json:"email"`
	Name       string    `gorm:"unique; not null" json:"name"`
	Url        string    `gorm:"default:https://github.com/shadcn.png;" json:"profpic"`
	LastOnline time.Time `gorm:"default:CURRENT_TIMESTAMP; not null" json:"lastonline"`
}

Jump to

Keyboard shortcuts

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