db

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Plan

type Plan struct {
	gorm.Model
	Identifier string
	Storage    uint64
	Upload     uint64
	Download   uint64
	Order      uint
}

type UserBandwidthQuota

type UserBandwidthQuota struct {
	gorm.Model
	UserID          uint `gorm:"uniqueIndex"`
	User            models.User
	Date            time.Time `gorm:"index"`
	BytesUploaded   uint64
	BytesDownloaded uint64
}

type UserDownload

type UserDownload struct {
	gorm.Model
	UserID   uint `gorm:"index"`
	User     models.User
	UploadID uint `gorm:"index"`
	Upload   models.Upload
	Bytes    uint64
	IP       string `gorm:"index"`
}

func (*UserDownload) TableName

func (u *UserDownload) TableName() string

type UserStorage

type UserStorage struct {
	gorm.Model
	UserID   uint `gorm:"index"`
	User     models.User
	UploadID uint `gorm:"index"`
	Upload   models.Upload
	Bytes    uint64
	IsAdd    bool   `gorm:"index"`
	IP       string `gorm:"index"`
}

func (*UserStorage) TableName

func (u *UserStorage) TableName() string

type UserStorageQuota

type UserStorageQuota struct {
	gorm.Model
	UserID      uint `gorm:"uniqueIndex"`
	User        models.User
	BytesStored uint64
}

type UserUpload

type UserUpload struct {
	gorm.Model
	UserID   uint `gorm:"index"`
	User     models.User
	UploadID uint `gorm:"index"`
	Upload   models.Upload
	Bytes    uint64
	IP       string `gorm:"index"`
}

func (*UserUpload) TableName

func (u *UserUpload) TableName() string

Jump to

Keyboard shortcuts

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