models

package
v0.0.0-...-5e8511f Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: AGPL-3.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitModels

func InitModels(db *gorm.DB) error

Types

type DownloadLimit

type DownloadLimit struct {
	ID        int64  `gorm:"primaryKey;autoIncrement"`
	UserID    uint64 `gorm:"index:download_limit_user_id_idx,unique"`
	User      *User
	Unlimited bool
	RateLimit int64
	Burst     int64
}

type UploadLimit

type UploadLimit struct {
	ID        int64  `gorm:"primaryKey;autoIncrement"`
	UserID    uint64 `gorm:"index:upload_limit_user_id_idx,unique"`
	User      *User
	Unlimited bool
	RateLimit int64
	Burst     int64
}

type User

type User struct {
	ID           uint64 `gorm:"primaryKey;autoIncrement"`
	Email        string `gorm:"index:idx_email,unique"`
	PasswordHash []byte
	CreatedAt    time.Time `gorm:"autoCreateTime"`
	Admin        bool
}

Jump to

Keyboard shortcuts

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