models

package
v0.0.0-...-a439f4a Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bot

type Bot struct {
	Token       string `gorm:"type:text;primaryKey"`
	UserID      int64  `gorm:"type:bigint"`
	BotID       int64  `gorm:"type:bigint"`
	BotUserName string `gorm:"type:text"`
	ChannelID   int64  `gorm:"type:bigint"`
}

type Channel

type Channel struct {
	ChannelID   int64  `gorm:"type:bigint;primaryKey"`
	ChannelName string `gorm:"type:text"`
	UserID      int64  `gorm:"type:bigint;"`
	Selected    bool   `gorm:"type:boolean;"`
}

type File

type File struct {
	ID        string    `gorm:"type:text;primaryKey;default:generate_uid(16)"`
	Name      string    `gorm:"type:text;not null"`
	Type      string    `gorm:"type:text;not null"`
	MimeType  string    `gorm:"type:text;not null"`
	Path      string    `gorm:"type:text;index"`
	Size      *int64    `gorm:"type:bigint"`
	Starred   bool      `gorm:"default:false"`
	Depth     *int      `gorm:"type:integer"`
	Category  string    `gorm:"type:text"`
	Encrypted bool      `gorm:"default:false"`
	UserID    int64     `gorm:"type:bigint;not null"`
	Status    string    `gorm:"type:text"`
	ParentID  string    `gorm:"type:text;index"`
	Parts     *Parts    `gorm:"type:jsonb"`
	ChannelID *int64    `gorm:"type:bigint"`
	CreatedAt time.Time `gorm:"default:timezone('utc'::text, now())"`
	UpdatedAt time.Time `gorm:"default:timezone('utc'::text, now())"`
}

type Part

type Part struct {
	ID   int64  `json:"id"`
	Salt string `json:"salt,omitempty"`
}

type Parts

type Parts []Part

func (*Parts) Scan

func (a *Parts) Scan(value interface{}) error

func (Parts) Value

func (a Parts) Value() (driver.Value, error)

type Session

type Session struct {
	UserId    int64     `gorm:"type:bigint;primaryKey"`
	Hash      string    `gorm:"type:text"`
	Session   string    `gorm:"type:text"`
	CreatedAt time.Time `gorm:"default:timezone('utc'::text, now())"`
}

type Upload

type Upload struct {
	UploadId  string    `gorm:"type:text"`
	UserId    int64     `gorm:"type:bigint"`
	Name      string    `gorm:"type:text"`
	PartNo    int       `gorm:"type:integer"`
	PartId    int       `gorm:"type:integer"`
	Encrypted bool      `gorm:"default:false"`
	Salt      string    `gorm:"type:text"`
	ChannelID int64     `gorm:"type:bigint"`
	Size      int64     `gorm:"type:bigint"`
	CreatedAt time.Time `gorm:"default:timezone('utc'::text, now())"`
}

type User

type User struct {
	UserId    int64     `gorm:"type:bigint;primaryKey"`
	Name      string    `gorm:"type:text"`
	UserName  string    `gorm:"type:text"`
	IsPremium bool      `gorm:"type:bool"`
	UpdatedAt time.Time `gorm:"default:timezone('utc'::text, now())"`
	CreatedAt time.Time `gorm:"default:timezone('utc'::text, now())"`
}

Jump to

Keyboard shortcuts

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