models

package
v0.0.0-...-b7c93c8 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	ID             uuid.UUID `gorm:"type:uuid;default:gen_random_uuid()"`
	CreatedAt      time.Time
	UpdatedAt      time.Time
	DeletedAt      gorm.DeletedAt
	UserID         uuid.UUID `gorm:"type:uuid;default:null;"`
	Username       string
	Domain         string
	PublicKey      string
	PrivateKey     string
	DisplayName    string
	Uri            string
	Url            string
	InboxUrl       string
	OutboxUrl      string
	FollowersUrl   string
	FollowingUrl   string
	SharedInboxUrl string
	ActorType      string
	IconUrl        string
	Summary        string
}

type Session

type Session struct {
	ID           uuid.UUID `gorm:"type:uuid;default:gen_random_uuid()"`
	LastActivity time.Time
	UserID       uuid.UUID `gorm:"type:uuid;"`
}

type User

type User struct {
	ID        uuid.UUID `gorm:"type:uuid;default:gen_random_uuid()"`
	CreatedAt time.Time
	UpdatedAt time.Time
	DeletedAt gorm.DeletedAt
	Username  string `gorm:"type:VARCHAR(50);NOT NULL" json:"username"`
	Email     string `gorm:"type:VARCHAR(100);UNIQUE;NOT NULL" json:"email"`
	Password  []byte `json:"-"`
	Sessions  []Session
	Account   Account
}

Jump to

Keyboard shortcuts

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