models

package
v0.0.0-...-d67b91f Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Binary

type Binary struct {
	gorm.Model
	ID       uuid.UUID `gorm:"type:uuid;primary_key"`
	Name     string
	FileName string
	UserID   uint
	Meta     []MetaBinary
}

type Card

type Card struct {
	gorm.Model
	ID              uuid.UUID `gorm:"type:uuid;primary_key"`
	Name            string    `gorm:"size:100"`
	CardHolderName  string
	Number          string
	Brand           string
	ExpirationMonth string
	ExpirationYear  string
	SecurityCode    string
	UserID          uint
	Meta            []MetaCard `gorm:"constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"`
}

type Login

type Login struct {
	gorm.Model
	ID       uuid.UUID `gorm:"type:uuid;primary_key"`
	Name     string    `gorm:"size:100"`
	URI      string
	Login    string
	Password string
	UserID   uint
	Meta     []MetaLogin `gorm:"constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"`
}

type MetaBinary

type MetaBinary struct {
	gorm.Model
	ID       uuid.UUID `gorm:"type:uuid;primary_key"`
	Name     string
	Value    string
	BinaryID uuid.UUID `gorm:"constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"`
}

type MetaCard

type MetaCard struct {
	gorm.Model
	ID     uuid.UUID
	Name   string
	Value  string
	CardID uuid.UUID
}

type MetaLogin

type MetaLogin struct {
	gorm.Model
	ID      uuid.UUID
	Name    string
	Value   string
	LoginID uuid.UUID
}

type MetaNote

type MetaNote struct {
	gorm.Model
	ID     uuid.UUID
	Name   string
	Value  string
	NoteID uuid.UUID
}

type Note

type Note struct {
	gorm.Model
	ID     uuid.UUID `gorm:"type:uuid;primary_key"`
	Name   string    `gorm:"size:100"`
	Note   string
	UserID uint
	Meta   []MetaNote `gorm:"constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"`
}

type User

type User struct {
	gorm.Model
	Email        string `gorm:"unique;uniqueIndex;not null"`
	Password     string `gorm:"not null"`
	AccessToken  string
	RefreshToken string
	Cards        []Card  `gorm:"constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"`
	Logins       []Login `gorm:"constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"`
	Notes        []Note  `gorm:"constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"`
	Binary       []Note  `gorm:"constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"`
}

func (*User) ToString

func (user *User) ToString() string

Jump to

Keyboard shortcuts

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