models

package
v0.0.0-...-dd772f4 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EmailAuth

type EmailAuth struct {
	Id        string    `gorm:"primary_key" json:"id,omitempty"`
	Email     string    `json:"email,omitempty"`
	CreatedAt time.Time `json:"createdAt,omitempty"`
}

type FlowId

type FlowId struct {
	FlowIdType    FlowIdType `sql:"flow_id_type"`
	UserId        string
	FlowId        string `gorm:"primary_key"`
	RelatedRoleId string
	WalletAddress string
}

TODO: Make relations for field `relatedRoleId`

type FlowIdType

type FlowIdType string
const (
	AUTH FlowIdType = "AUTH"
	ROLE FlowIdType = "ROLE"
)

func (*FlowIdType) Scan

func (fit *FlowIdType) Scan(value interface{}) error

func (FlowIdType) Value

func (fit FlowIdType) Value() (driver.Value, error)

type Sotreus

type Sotreus struct {
	Name             string `gorm:"primary_key" json:"name"`
	WalletAddress    string `json:"walletAddress"`
	UserId           string `json:"userId,omitempty"`
	Region           string `json:"region"`
	VpnEndpoint      string `json:"VpnEndpoint"`
	FirewallEndpoint string `json:"firewallEndpoint"`
	Password         string `json:"password"`
	Firewall         string `json:"firewall"`
}

type Subscription

type Subscription struct {
	ID        string    `gorm:"primary_key" json:"id,omitempty"`
	UserId    string    `json:"userId,omitempty"`
	StartTime time.Time `json:"startTime,omitempty"`
	EndTime   time.Time `json:"endTime,omitempty"`
	Type      string    `json:"type,omitempty"`
}

type TStripePiType

type TStripePiType string
var SotreusSubscription TStripePiType = "SotreusSubscription"

type User

type User struct {
	UserId            string   `gorm:"primary_key" json:"userId,omitempty"`
	Name              string   `json:"name,omitempty"`
	WalletAddress     *string  `json:"walletAddress,omitempty"`
	Discord           string   `json:"discord"`
	Twitter           string   `json:"twitter"`
	FlowIds           []FlowId `gorm:"foreignkey:UserId" json:"-"`
	ProfilePictureUrl string   `json:"profilePictureUrl,omitempty"`
	Country           string   `json:"country,omitempty"`
	EmailId           *string  `json:"emailId,omitempty"`
}

type UserStripePi

type UserStripePi struct {
	Id           string        `gorm:"primary_key" json:"id,omitempty"`
	UserId       string        `json:"userId,omitempty"`
	StripePiId   string        `json:"stripePiId,omitempty"`
	StripePiType TStripePiType `json:"stripePiType,omitempty"`
	CreatedAt    time.Time     `json:"createdAt,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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