model

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const TableNameDeleteQueue = "pikpak_delete_queue"
View Source
const TableNameFile = "pikpak_file"
View Source
const TableNameMasterAccount = "pikpak_master_account"
View Source
const TableNameRedeemCode = "pikpak_redeem_code"
View Source
const TableNameSharedLink = "pikpak_shared_link"
View Source
const TableNameToken = "pikpak_token"
View Source
const TableNameUser = "pikpak_user"
View Source
const TableNameWorkerAccount = "pikpak_worker_account"

Variables

This section is empty.

Functions

This section is empty.

Types

type DeleteQueue

type DeleteQueue struct {
	WorkerUserID     string    `gorm:"column:worker_user_id;primaryKey" json:"worker_user_id"`
	OriginalLinkHash string    `gorm:"column:original_link_hash;primaryKey" json:"original_link_hash"`
	Status           string    `gorm:"column:status;not null" json:"status"`
	CreatedAt        time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP" json:"created_at"`
	NextTrigger      time.Time `gorm:"column:next_trigger;not null;default:CURRENT_TIMESTAMP" json:"next_trigger"`
	Ext              string    `gorm:"column:ext" json:"ext"`
}

DeleteQueue mapped from table <pikpak_delete_queue>

func (*DeleteQueue) TableName

func (*DeleteQueue) TableName() string

TableName DeleteQueue's table name

type File

type File struct {
	AutoID           int64     `gorm:"column:auto_id;primaryKey;autoIncrement:true" json:"auto_id"`
	MasterUserID     string    `gorm:"column:master_user_id;not null" json:"master_user_id"`
	WorkerUserID     string    `gorm:"column:worker_user_id;not null" json:"worker_user_id"`
	FileID           string    `gorm:"column:file_id;not null" json:"file_id"`
	TaskID           string    `gorm:"column:task_id;not null" json:"task_id"`
	Status           string    `gorm:"column:status;not null" json:"status"`
	IsDir            bool      `gorm:"column:is_dir;not null" json:"is_dir"`
	Size             int64     `gorm:"column:size;not null" json:"size"`
	Name             string    `gorm:"column:name;not null" json:"name"`
	CreatedAt        time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP" json:"created_at"`
	UpdatedAt        time.Time `gorm:"column:updated_at;not null;default:CURRENT_TIMESTAMP" json:"updated_at"`
	OriginalLinkHash string    `gorm:"column:original_link_hash;not null" json:"original_link_hash"`
	Error            string    `gorm:"column:error" json:"error"`
}

File mapped from table <pikpak_file>

func (*File) TableName

func (*File) TableName() string

TableName File's table name

type MasterAccount

type MasterAccount struct {
	UserID          string    `gorm:"column:user_id;primaryKey" json:"user_id"`
	KeepshareUserID string    `gorm:"column:keepshare_user_id;not null" json:"keepshare_user_id"`
	Email           string    `gorm:"column:email;not null" json:"email"`
	Password        string    `gorm:"column:password;not null" json:"password"`
	CreatedAt       time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP" json:"created_at"`
	UpdatedAt       time.Time `gorm:"column:updated_at;not null;default:CURRENT_TIMESTAMP" json:"updated_at"`
}

MasterAccount mapped from table <pikpak_master_account>

func (*MasterAccount) TableName

func (*MasterAccount) TableName() string

TableName MasterAccount's table name

type RedeemCode added in v0.3.0

type RedeemCode struct {
	AutoID     int64     `gorm:"column:auto_id;primaryKey;autoIncrement:true" json:"auto_id"`
	Code       string    `gorm:"column:code;not null" json:"code"`
	Status     string    `gorm:"column:status;not null;default:NOT_USED;comment:NOT_USED, USED, INVALID" json:"status"`
	UsedUserID string    `gorm:"column:used_user_id" json:"used_user_id"`
	CreatedAt  time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP" json:"created_at"`
	UpdatedAt  time.Time `gorm:"column:updated_at;not null;default:CURRENT_TIMESTAMP" json:"updated_at"`
}

RedeemCode mapped from table <pikpak_redeem_code>

func (*RedeemCode) TableName added in v0.3.0

func (*RedeemCode) TableName() string

TableName RedeemCode's table name

type SharedLink struct {
	ShareID      string    `gorm:"column:share_id;primaryKey" json:"share_id"`
	FileID       string    `gorm:"column:file_id;not null" json:"file_id"`
	MasterUserID string    `gorm:"column:master_user_id;not null" json:"master_user_id"`
	WorkerUserID string    `gorm:"column:worker_user_id;not null" json:"worker_user_id"`
	CreatedAt    time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP" json:"created_at"`
}

SharedLink mapped from table <pikpak_shared_link>

func (*SharedLink) TableName

func (*SharedLink) TableName() string

TableName SharedLink's table name

type Token

type Token struct {
	UserID       string    `gorm:"column:user_id;primaryKey" json:"user_id"`
	AccessToken  string    `gorm:"column:access_token;not null" json:"access_token"`
	RefreshToken string    `gorm:"column:refresh_token;not null" json:"refresh_token"`
	Expiration   time.Time `gorm:"column:expiration;not null" json:"expiration"`
	CreatedAt    time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP" json:"created_at"`
}

Token mapped from table <pikpak_token>

func (*Token) TableName

func (*Token) TableName() string

TableName Token's table name

type User

type User struct {
	ID           int32     `gorm:"column:id;primaryKey" json:"id"`
	Name         string    `gorm:"column:name;not null" json:"name"`
	PasswordHash string    `gorm:"column:password_hash;not null" json:"password_hash"`
	Email        string    `gorm:"column:email;not null" json:"email"`
	CreatedAt    time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP" json:"created_at"`
	UpdatedAt    time.Time `gorm:"column:updated_at;not null;default:CURRENT_TIMESTAMP" json:"updated_at"`
}

User mapped from table <pikpak_user>

func (*User) TableName

func (*User) TableName() string

TableName User's table name

type WorkerAccount

type WorkerAccount struct {
	UserID            string    `gorm:"column:user_id;primaryKey" json:"user_id"`
	MasterUserID      string    `gorm:"column:master_user_id;not null" json:"master_user_id"`
	Email             string    `gorm:"column:email;not null" json:"email"`
	Password          string    `gorm:"column:password;not null" json:"password"`
	UsedSize          int64     `gorm:"column:used_size;not null" json:"used_size"`
	LimitSize         int64     `gorm:"column:limit_size;not null" json:"limit_size"`
	PremiumExpiration time.Time `gorm:"column:premium_expiration;not null;default:2000-01-01 00:00:00" json:"premium_expiration"`
	CreatedAt         time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP" json:"created_at"`
	UpdatedAt         time.Time `gorm:"column:updated_at;not null;default:CURRENT_TIMESTAMP" json:"updated_at"`
	InvalidUntil      time.Time `gorm:"column:invalid_until;not null;default:2000-01-01 00:00:00" json:"invalid_until"`
}

WorkerAccount mapped from table <pikpak_worker_account>

func (*WorkerAccount) TableName

func (*WorkerAccount) TableName() string

TableName WorkerAccount's table name

Jump to

Keyboard shortcuts

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