models

package
v0.0.0-...-5767ed4 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2022 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FediAccount

type FediAccount struct {
	ID          int64         `validate:"-" bun:"id,pk,autoincrement"`
	CreatedAt   time.Time     `validate:"-" bun:",nullzero,notnull,default:current_timestamp"`
	UpdatedAt   time.Time     `validate:"-" bun:",nullzero,notnull,default:current_timestamp"`
	ActorURI    string        `validate:"url" bun:",nullzero,notnull"`
	Username    string        `validate:"-" bun:",unique:unique_fedi_user,nullzero,notnull"`
	InstanceID  int64         `validate:"-" bun:",unique:unique_fedi_user,nullzero,notnull"`
	Instance    *FediInstance `validate:"-" bun:"rel:belongs-to,join:instance_id=id"`
	DisplayName string        `validate:"-" bun:",nullzero"`
	LastFinger  time.Time     `validate:"-" bun:",notnull"`
	LogInCount  int64         `validate:"-" bun:",notnull"`
	LogInLast   time.Time     `validate:"-" bun:",nullzero"`

	// login stuff
	IsAdmin   bool `validate:"-" bun:",notnull"`
	IsCouncil bool `validate:"-" bun:",notnull"`
}

FediAccount represents a federated social account.

type FediInstance

type FediInstance struct {
	ID             int64     `validate:"-" bun:"id,pk,autoincrement"`
	CreatedAt      time.Time `validate:"-" bun:",nullzero,notnull,default:current_timestamp"`
	UpdatedAt      time.Time `validate:"-" bun:",nullzero,notnull,default:current_timestamp"`
	Domain         string    `validate:"-" bun:",nullzero,notnull,unique"`
	ActorURI       string    `validate:"url" bun:",nullzero,notnull"`
	ServerHostname string    `validate:"-" bun:",nullzero,notnull,unique"`
	Software       string    `validate:"-" bun:",nullzero,notnull"`
}

FediInstance represents a federated social instance.

type Transaction

type Transaction struct {
	ID        int64     `validate:"-" bun:"id,pk,autoincrement"`
	CreatedAt time.Time `validate:"-" bun:",nullzero,notnull,default:current_timestamp"`
	Type      string    `validate:"-" bun:",nullzero,notnull"`
	MetaData  string    `validate:"-" bun:",nullzero,notnull"`
}

Transaction represents a transaction lgo entry.

Jump to

Keyboard shortcuts

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