database

package
v0.0.0-...-a66c768 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2020 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Migrate

func Migrate(db *gorm.DB)

Types

type Destination

type Destination struct {
	ID                 uint `gorm:"primary_key"`
	CreatedAt          time.Time
	UpdatedAt          time.Time
	ExternalIdentifier string `gorm:"unique_index:idx_destination_identifier" json:"external_identifier"`
	DestinationType    string `gorm:"unique_index:idx_destination_identifier" json:"destination_type"`
}

type Subscription

type Subscription struct {
	ID                 uint `gorm:"primary_key"`
	CreatedAt          time.Time
	UpdatedAt          time.Time
	Destination        Destination
	SubscriptionType   SubscriptionType
	DestinationID      uint `gorm:"unique_index:idx_destination_subtype"`
	SubscriptionTypeID uint `gorm:"unique_index:idx_destination_subtype"`
	LastItem           int64
}

type SubscriptionType

type SubscriptionType struct {
	ID            uint `gorm:"primary_key"`
	CreatedAt     time.Time
	UpdatedAt     time.Time
	Type          string `gorm:"unique_index:idx_type_tags" json:"type"`
	Tags          string `gorm:"unique_index:idx_type_tags" json:"tags"`
	Subscriptions []Subscription
}

Jump to

Keyboard shortcuts

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