model

package
v0.0.0-...-2effb0b Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Link struct {
	ID          uint64 `json:"id" gorm:"primaryKey"`
	RedirectUrl string `json:"redirect_url" gorm:"unique;not null"`
	ShortenedId string `json:"shortened_id" gorm:"unique;not null"`
	Clicked     uint64 `json:"clicked"`
	UserID      uint   `json:"user_id" gorm:"not null"`
}

type User

type User struct {
	gorm.Model
	Name           string `json:"name" gorm:"not null"`
	Email          string `json:"email" gorm:"unique;not null"`
	HashedPassword string `json:"-" gorm:"unique;not null"`
	Links          []Link `json:"links" gorm:"foreignKey:UserID"`
}

Jump to

Keyboard shortcuts

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