package
Version:
v0.0.0-...-2effb0b
Opens a new window with list of versions in this module.
Published: Jan 24, 2023
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
¶
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 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"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.