models

package
v0.0.0-...-2ff8efa Latest Latest
Warning

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

Go to latest
Published: Nov 20, 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 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:uuid;primaryKey;default:uuid7()"`
	Name      string                            `gorm:"type:text;not null"`
	Type      string                            `gorm:"type:text;not null"`
	MimeType  string                            `gorm:"type:text;not null"`
	Size      *int64                            `gorm:"type:bigint"`
	Category  string                            `gorm:"type:text"`
	Encrypted bool                              `gorm:"default:false"`
	UserID    int64                             `gorm:"type:bigint;not null"`
	Status    string                            `gorm:"type:text"`
	ParentID  sql.NullString                    `gorm:"type:uuid;index"`
	Parts     datatypes.JSONSlice[schemas.Part] `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 FileShare

type FileShare struct {
	ID        string     `gorm:"type:uuid;default:uuid_generate_v4();primary_key"`
	FileID    string     `gorm:"type:uuid;not null"`
	Password  *string    `gorm:"type:text"`
	ExpiresAt *time.Time `gorm:"type:timestamp"`
	CreatedAt time.Time  `gorm:"type:timestamp;not null;default:current_timestamp"`
	UpdatedAt time.Time  `gorm:"type:timestamp;not null;default:current_timestamp"`
	UserID    int64      `gorm:"type:bigint;not null"`
}

type Session

type Session struct {
	UserId      int64     `gorm:"type:bigint;primaryKey"`
	Hash        string    `gorm:"type:text"`
	SessionDate int       `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